URL rewriting: IIS
From Smart Job Board help
IIS7 (as opposed to IIS6) supports url rewriting in an easy and comprehensible way. Rewriting rules can be specified in two ways:
Using GUI (IIS Admin Panel)
Or directly editing web.config file which should be located in the root directory of the software.
Also IIS automatically determines paths and that allows using the same script in a case when the software installed in root directory and subdirectory of a virtual host.
Note: the web.config file may not exist if the software was installed to the subdirectory relative to www root.
If web.config exists:
• Open web.config in the Notepad editor,
• add rewrite part of the code (copy and paste it from example given below),
• save
If web.config does not exist:
• Create empty file web.config, open it in the Notepad editor,
• Copy and paste whole example code (see the example below)
• save
Example
For work of this config you need to have IIS7 URL Rewrite Module extension installed.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rewrite backend URLs" stopProcessing="true">
<match url="^admin(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="admin/index.php?q={R:1}" appendQueryString="true" />
</rule>
<rule name="Rewrite frontend 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="index.php?q={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
