WordPress url error on IIS 7
I have install WordPress as a web applicati开发者_高级运维on at IIS 7 but I have a problem.
When I access the site like http://foo.com/wordpress/
it works great.
But when I go to http://foo.com/WordPress/
it give me 404 error. http://foo.com/WordPress/index.php
works, but don't give any posts from the database.
So can I do anything that will redirect /WordPress/
or /WORDPRESS/
to /wordpress/
?
Its bit older question, but I was dealing with the same issue and haven't found any clear answer, so this might actually help somebody. I fixed the same with following steps:
1) Make sure that the rules in the web.config of the folder with wordpress are case insensitive. My web.config looks like this:
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*" ignoreCase="true" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
2)Install and activate WordPress plugin (the first code snippet) from this link: case insensitive permalinks
It isn't the best solution, because it doesn't make the nice canonical url's with 301 permanent redirect for example, but works as a quick fix.
精彩评论