html - I want to redirect nitroindia.org to www.nitroindia.org in godaddy windows hosting -
this question has answer here:
i wanted redirect website nitroindia.org www.nitroindia.org in windows hosting w.ith web.config file. replaced web.config file gave me resultant 500 internal server error.
<?xml version=�1.0? encoding=�utf-8? ?> <configuration> <system.webserver> <rewrite> <rules> <rule name=�redirect ml2? stopprocessing=�true�> <match url=�.*� /> <conditions> <add input=�{http_host}� pattern=�^nitroindia.org$� /> </conditions> <action type=�redirect� url=�http://www.nitroindia.org/{r:0}� redirecttype=�permanent� /> </rule> </rules> </rewrite> </system.webserver> </configuration>
my default file name index.html
i'm guessing using iis 7.5 , below should work:
<?xml version="1.0"?> <configuration> <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> </configuration>
Comments
Post a Comment