Removing Index.php in Permalinks using IIS 8
-
Hi Everyone,
So I’ve been spending the better part of the day to figure out a way to remove “/index.php” from my permalinks.
I’m using discountasp.net, so it’s a Windows server. I don’t prefer this, but for the person I’m making the site for, it’s necessary.
So far, I’ve found a solution changing my web.config file to:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="WPurls" 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> </rules> </rewrite> </system.webServer> </configuration>
This works to remove /index.php from my permalinks on pages, but what happens now is my homepage needs to have /index.php at the end, otherwise it just shows a directory listing.
Any help would be really appreciated.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Removing Index.php in Permalinks using IIS 8’ is closed to new replies.