منوی رادکام

راهنمای تصویری افزودن URL rewrite در web.config

جهت استفاده از url rewrite در IIS می توانید موارد زیر را درفایل web.config اضافه نمایید ، همچنین روند افزودن آن نیز در IIS بصورت زیر خواهد بود:

 

url11
  

 

 

 

url2
 

 

  

 

url3

 

 

url4
 

 

 

url5
  

 

 

 

url6

 

 

url7
  

 

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

Normal0falsefalsefalseEN-USX-NONEAR-SA


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

24 شهریور 1393

11,849بازدید

دیدگاه کاربران

هنوز دیدگاهی ثبت نشده است.

شما می‌توانید درباره این مقاله، دیدگاه خود را ثبت کنید.
راهنمای تصویری افزودن URL rewrite در web.config