Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fancy URLs in IIS
#1
Hi, I wrote an extension with some configurations for IIS to allow Fancy URLs which you can download from http://get-simple.info/extend/plugin/fan...n-iis/496/

Feel free to let me know how it goes and if there are any problems.
Reply
#2
Really thanks, it works successfully!

But for that case, can you explain how to use for subfolders? such as

http://tur-ip.com/ main GS
http://tur-ip.com/en/ a new GS at subfolder

How should change web.config file for both / and /en/ GSs?

Thanks a lot
Reply
#3
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.
Reply
#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
#5
Thanks sharkbait, good example!
Reply




Users browsing this thread: 1 Guest(s)