PDA

View Full Version : سوال: ریدایرکت کردن از طریق وب کانفیگ...(فوریه فوری)



Mohammad_dn
چهارشنبه 23 بهمن 1392, 18:38 عصر
سلام من میخوام از طریف فایل web.config یکی از دامنه هامو redirect کنم

خیلی زود نیاز دارم

Mohammad_dn
پنج شنبه 24 بهمن 1392, 00:28 صبح
آقا کسی نیست به این سوال پاسخ بده؟

roxf18
پنج شنبه 24 بهمن 1392, 12:28 عصر
<system.webserver> <rewrite> <rules> <rule name="Redirect to WWW" stopprocessing="true"> <match url=".*"></match> <conditions> <add input="{HTTP_HOST}" pattern="^yourdomainname.com$"></add> </conditions> <action type="Redirect" url="http://www.yourdomainname.com/{R:0}" redirecttype="Permanent"> </action></rule> <rule name="Default Document" stopprocessing="true"> <match url="(.*?)/?default\.aspx$"> <action type="Redirect" url="{R:1}/"> </action></match></rule> </rules> </rewrite> </system.webserver>

Mohammad_dn
پنج شنبه 24 بهمن 1392, 14:09 عصر
خطا میده

The requested page cannot be accessed because the related configuration data for the page is invalid.

roxf18
پنج شنبه 24 بهمن 1392, 19:31 عصر
<system.webServer> <rewrite> <rules> <rule name="Canonical host name"> <match url="^(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^www\.domain\.com$" negate="true" /> </conditions> <action type="Redirect" url="http://www.domain.com/{R:1}" /> </rule> </rules> </rewrite> </system.webServer>

Mohammad_dn
پنج شنبه 24 بهمن 1392, 20:06 عصر
بازم همون خطا رو میده

کد من:


<rewrite>
<rules>
<rule name="Canonical host name">
<match url="^(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.sarkeshan\.ir$" negate="true" />
</conditions>
<action type="Redirect" url="http://www.Up.Sarkeshan.ir/{R:1}" />
</rule>
</rules>
</rewrite>