redirect چندین دامین به دامین اصلی

ساخت وبلاگ

سلام
من چنتا دامین دارم که می خوام همه به یک دامین redirect بشه
دامین های من اینهاست:
http://www.kahandeh.ir
http://kahandeh.ir
http://www.kahande.ir
http://kahande.ir
http://www.kahandeh.com
http://www.kahande.com
http://kahande.com
همگی اینها به ادرس
http://kahandeh.com
انتقال کنه
یه کدی دارم که نمی تونم بفهمم چیکار میکنه اما درست کار می کنه. البته برای دوتا دامین:


<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="WWW Rewrite" enabled="true">
<match url="(.*)"/>
<conditions>
<add input="{HTTP_HOST}" negate="true" patte="^www.([.a-zA-Z0-9]+)$"/>
</conditions>
<action type="Redirect" url="http://www.{HTTP_HOST}/{R:0}" appendQueryString="true" redirectType="Permanent"/>
</rule>
<rule name="Rewrite domain requests" stopProcessing="true" enabled="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" patte="^(www.)?([.a-zA-Z0-9]+)$" />
<add input="{HTTP_HOST}" patte="^www.kaaweb.net" negate="true" />
</conditions>
<action type="Redirect" url="http://www.kaaweb.net/{R:1}" redirectType="Permanent" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>

- - , .

برنامه نویس...
ما را در سایت برنامه نویس دنبال می کنید

برچسب : نویسنده : محمد رضا جوادیان programers بازدید : 148 تاريخ : چهارشنبه 23 دی 1394 ساعت: 20:24