GetSimple Support Forum
Fancy URLs in IIS - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: Fancy URLs in IIS (/showthread.php?tid=3449)



Fancy URLs in IIS - rjenkins1984 - 2012-08-18

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/fancy-urls-in-iis/496/

Feel free to let me know how it goes and if there are any problems.


RE: Fancy URLs in IIS - oratoran - 2012-11-15

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


RE: Fancy URLs in IIS - rjenkins1984 - 2012-11-20

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.


RE: Fancy URLs in IIS - sharkbait - 2013-11-14

(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>



RE: Fancy URLs in IIS - rjenkins1984 - 2013-11-14

Thanks sharkbait, good example!