Mobile app version of vmapp.org
Login or Join
Murphy175

: 301 redirect code for IIS6 server How can I set the non-www url to redirect to www format. Please guide me - if I do it through server control panel, the site doesn't work.

@Murphy175

Posted in: #301Redirect #Iis6

How can I set the non-www url to redirect to www format.

Please guide me - if I do it through server control panel, the site doesn't work.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy175

2 Comments

Sorted by latest first Latest Oldest Best

 

@Vandalay111

www.webconfs.com/how-to-redirect-a-webpage.php
I used this site to 301 my site, though mines an Apache server, it has an ISS walk-through also.

Or visit this link: www.windowshostingasp.net/windows_hosting_forums/showthread.php?t=35

Login in your windows server and start IIS console.

Now choose the server running the site you want to forward. Remember that you need 2 sites - one to forward from and one to forward to. These can be on the same or separate servers.

Right click on the site you want to redirect from and choose Properties - Home Directory.

The default is the first choice, "A directory located on this computer". Change it to "A redirection to a URL" and type in the new URL.

If you want it to be a 301, then be sure to check ON the choice for “A permanent redirection for this resource”. If you want it to be a 302, leave the choice checked OFF.
If you want to pass on some variables, for example, you wanted to redirect an ASP.NET site that accepted arguments for some pages and pass those same arguments on to the same pages at the new site.

In this case, in the "Redirect to:" box, enter the domain you wish to move to (no trailing slash), plus $S$Q.

By example: www.seconddomain.com$S$Q
Next, check the options that state the client will be sent to "The exact URL entered above", as well as "A permanent redirection for this resource" (if you want it to be a 301).

$S$Q are tags that IIS will automatically replace - $S will be replaced with the subdirectory location (such as “/modules/store.aspx”) and $Q will be replaced with the query string (such as “?id=1”).
"

10% popularity Vote Up Vote Down


 

@Kevin317

Google turned up a bunch of tutorials for this. This one and this one looks as good as any.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme