Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

URL Rewrite is working great for aspx but not for php...

$
0
0
I'm having a problem with URL Rewrite, it seems that my rules work if they are rewritten to an aspx page, but if I try to rewrite them to a php page they 404 on me. Yes I have PHP running, IIS7 etc.

<rule name="wordpress1" enabled="true">
<match url="^([_0-9a-z-]+)\.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="article.aspx?name={R:1}" logRewrittenUrl="true" />
</rule>

the above works perfectly, however the below fails with a 404.
<rule name="wordpress2" enabled="true">
<match url="^([_0-9a-z-]+)\.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="index.php?name={R:1}" logRewrittenUrl="true" />
</rule>
You can browse to index.php?name=whatever and it works as well, the rewrite just won't make it happen.
Any ideas?

Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>