Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fancy URLs in IIS
#4
Information 
(2012-11-20, 02:33:08)rjenkins1984 Wrote: Hi Oratoran,

lucky you PM'd me last week so we could get this sorted because I've only just seen this forum post Smile

For anyone else having this problem, the fix is easy. Open web.config in the sub-installation and change the text "GetSimple Fancy URLs" (e.g. change it to "GetSimple Fancy URLs2") The problem is that IIS likes all rule names to be unique, so making this change will avoid any issues.

I've added a note on the extension page to this effect. Happy coding! Smile

@oratoran since you had this problem I updated the extension so now it only requires one file.

Just in case anybody wants an example of this, your web.config file should contain the following...

Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <location path="." inheritInChildApplications="false">
        <system.webServer>
            <rewrite>
                <rules>
                  <rule name="GetSimple Fancy URLs" stopProcessing="true">
                        <match url="^([^/]+)/?$" />
                        <conditions>
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="?id={R:1}" />
                    </rule>
                  <rule name="GetSimple Fancy URLs 2" stopProcessing="true">
                    <match url="([^/]+)/?/?$" />
                    <conditions>
                      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="?id={R:1}" />
                  </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </location>
</configuration>
Reply


Messages In This Thread
Fancy URLs in IIS - by rjenkins1984 - 2012-08-18, 01:30:07
RE: Fancy URLs in IIS - by oratoran - 2012-11-15, 02:37:28
RE: Fancy URLs in IIS - by rjenkins1984 - 2012-11-20, 02:33:08
RE: Fancy URLs in IIS - by sharkbait - 2013-11-14, 21:45:41
RE: Fancy URLs in IIS - by rjenkins1984 - 2013-11-14, 23:34:00



Users browsing this thread: 1 Guest(s)