Zadávat je to samozřejmě lepší přímo přes IIS.
<configuration>
<system.webServer>
<directoryBrowse enabled="true" />
<rewrite>
<rules>
<rule name="RemoveDevices.aspx" enabled="true">
<match url="(.*/)Website/(Demo\.aspx)" />
<conditions>
<add input="{REMOTE_ADDR}" pattern="127\.0\.0\.1" negate="true" />
<add input="{REMOTE_ADDR}" pattern="10\.15\.1\.95" negate="true" /> <!--IP ADDRESS OF YOUR SERVER-->
<add input="{REMOTE_ADDR}" pattern="CZ-DEV095\.develop.local" negate="true" /> <!--HOST NAME OF YOUR SERVER-->
<add input="{HTTP_HOST}" pattern="localhost" negate="true" />
</conditions>
<action type="Rewrite" url="{R:1}NEW_SITE/{R:2}" logRewrittenUrl="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
<system.webServer>
<directoryBrowse enabled="true" />
<rewrite>
<rules>
<rule name="RemoveDevices.aspx" enabled="true">
<match url="(.*/)Website/(Demo\.aspx)" />
<conditions>
<add input="{REMOTE_ADDR}" pattern="127\.0\.0\.1" negate="true" />
<add input="{REMOTE_ADDR}" pattern="10\.15\.1\.95" negate="true" /> <!--IP ADDRESS OF YOUR SERVER-->
<add input="{REMOTE_ADDR}" pattern="CZ-DEV095\.develop.local" negate="true" /> <!--HOST NAME OF YOUR SERVER-->
<add input="{HTTP_HOST}" pattern="localhost" negate="true" />
</conditions>
<action type="Rewrite" url="{R:1}NEW_SITE/{R:2}" logRewrittenUrl="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Zdroje
0 komentářů:
Okomentovat