رادکام
جهت استفاده از url rewrite در IIS می توانید موارد زیر را درفایل web.config اضافه نمایید ، همچنین روند افزودن آن نیز در IIS بصورت زیر خواهد بود:
<rewrite>
<rules>
<rule name="URL Alias" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="shorturl.com" />
</conditions>
<action type="Rewrite" url="/support/{R:0}" />
</rule>
</rewrite>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Please refer to machine.config.comments for a description and
the default values of each configuration section.
For a full documentation of the schema please refer to
http://go.microsoft.com/fwlink/?LinkId=42127
To improve performance, machine.config should contain only those
settings that differ from their defaults.
-->
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.html" />
<add value="index.php" />
<add value="default.php" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="iisstart.htm" />
<add value="default.aspx" />
</files>
</defaultDocument>
<httpErrors errorMode="Detailed" />
<rewrite>
<rules>
<rule name="URL Alias" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="shorturl.com" />
</conditions>
<action type="Rewrite" url="/support/{R:0}" />
</rule>
</rewrite>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
<location path="tester">
</location>
</configuration>
11,284بازدید
دیدگاه کاربران
هنوز دیدگاهی ثبت نشده است.
شما میتوانید درباره این مقاله، دیدگاه خود را ثبت کنید.