apache - Website Redirect on IIS -
on apache server, can website redirect placing .htaccess
file on root folder following content:
rewriteengine on rewriterule ^(.*)$ http://www.newdomain.com/$1 [r=permanent,l]
is possible same way (placing file on root folder redirect) on iis?
yes, add web.config file in place of .htaccess file.
web.config:
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webserver> <rewrite> <rules> <rule name="redirectrule" stopprocessing="true"> <match url="^(.*)$" /> <action type="redirect" url="http://www.newdomain.com/{r:1}" /> </rule> </rules> </rewrite> </system.webserver> </configuration>
more info here: http://www.iis.net/downloads/microsoft/url-rewrite
Comments
Post a Comment