Clean URL's in IIS7

26 views
Skip to first unread message

Sam Collett

unread,
Nov 6, 2009, 8:40:33 AM11/6/09
to Pixie
Thanks to the URL Rewite module in IIS 7 (Windows 2008), I have
managed to get clean URL's working.

In you web.config, just use

<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="pixie" 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>
</system.webServer>
</configuration>

This has only been tested on the root of a website, not in a sub
directory.

For old versions of IIS (i.e. if you use Windows 2003), http://www.urlrewriting.net/
can be used

Scott

unread,
Nov 14, 2009, 3:40:09 PM11/14/09
to Pixie
This is very handy. Good to see IIS has this option. I will add a link
to this thread in the Wiki.

Scott
Reply all
Reply to author
Forward
0 new messages