IIS Rewrite rule doesn't work if not logged in as admin
-
I have my wordpress installed in a subfolder of my domain: http://mydomain.com/Blog.
I have a rewrite rule set up which loads the wordpress pages without having “index.php” in the URL:
<rewrite> <rules> <rule name="wordpress" patternSyntax="Wildcard"> <match url="*"/> <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>
With this rewrite rule, my blog loads at http://mydomain.com/Blog, and there’s no need to use index.php like http://mydomain.com/Blog/index.php.
The issue is that the above only works if I’m logged in to wp-admin, specifically, if the “wordpress-logged-in” cookie is there. Otherwise, http://mydomain.com/Blog returns a blank page (no error – HTTP response 200).
I am totally baffled by this – why would a cookie have an effect on this?
Can this be a bug? How do I go about fixing this?
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘IIS Rewrite rule doesn't work if not logged in as admin’ is closed to new replies.