Question

When I put my web.config into any folder/main directory it seems to be throwing the HTTP error code: 500--unfortuenly I don't have access to the logs so I can't see why, so surely it's down to my web.config - I've never used IIS before but I'm trying to re-route all requests to a file called 'api.php', here's my web.config file.

<rewrite>
    <rules>
        <rule name="rule 1Q">
            <match url="^/.*"  />
            <action type="Rewrite" url="/api.php" />
        </rule>
    </rules>
</rewrite>

Apache equivalent:

RewriteEngine on
RewriteRule ^/.* /api.php  

Any help is greatly appreciated.

Was it helpful?

Solution

This is not an exact answer because I am not sure of your server variables but here is something that might be useful to you. Here. This walks through the IIS set up for version 7 and it has some basic concepts. There is rewrite module/tool that could help but I haven't used it. And another document here...Shows the GUI interface like the first link and is in 7.5.

Again not specific solutions but hopeful you have some server gurus there that can help you at least get the IIS settings right (or at least not sound dumb if you have to communicate something specific to them) if this is a first time IIS Isapi venture for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top