Permalink Trouble with IIS Rewrite
-
Hi guys
I have two sites – ppcglasgow.co.uk and ppcacademy.co.uk. I used the URL Rewrite module in IIS on both of them, but ppcglasgow.co.uk still displays index.php in the URLs. When I try the rule, the sub links work but the homepage doesn’t resolve.
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules><rule name="RemoveTrailingSlashRule1" enabled="true" stopProcessing="true"><match url="(.*)/$" /><conditions><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /></conditions><action type="Redirect" url="{R:1}" /></rule><rule name="Main Rule" enabled="true" stopProcessing="true"><match url=".*" /><conditions logicalGrouping="MatchAll"><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /></conditions><action type="Rewrite" url="index.php/{R:0}" /></rule><rule name="non www to www" enabled="true" patternSyntax="Wildcard" stopProcessing="true"><match url="*" /><conditions logicalGrouping="MatchAny"><add input="{HTTP_HOST}" pattern="ppcglasgow.co.uk" /></conditions><action type="Redirect" url="https://www.ppcglasgow.co.uk/{R:0}" /></rule> <rule name="wordpress" enabled="false" 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> <defaultDocument> <files> <clear /> <add value="Index.php" /> <add value="Index.html" /> <add value="Index.htm" /> <add value="Index.cfm" /> <add value="Index.shtml" /> <add value="Index.shtm" /> <add value="Index.stm" /> <add value="Index.php3" /> <add value="Index.asp" /> <add value="Index.aspx" /> <add value="Default.htm" /> <add value="Default.asp" /> <add value="Default.aspx" /> </files> </defaultDocument> </system.webServer> </configuration>
Can anyone tell me what I might be doing wrong, or has anyone had this problem before?
- The topic ‘Permalink Trouble with IIS Rewrite’ is closed to new replies.