Hi I want to redirect 301 all url on my website from non-www to www But when i redirect on ISS then go to url www it say page not found Pls tell me details Thanks in advance Sorry for i speak English not well
dstiles
8:32 pm on Jul 26, 2011 (gmt 0)
You must set up two IIS records, one for www and one for non-www.
Set up the www one as usual (for example, point Home Directory to the web site root folder (usually public_html) and select the directory mode "A directory located on this computer". Ensure the Local Path is set to Read.
For the non-WWW record select "A redirection to a URL" and enter the full www url into the Redirect To field (eg http://www.example.com - no trailing /). Select The Client Will Be Sent To: "A permament redirection for this resource".
I do not know if this still applies, but in earlier versions of IIS it was necessary to set the non-www record's folder to the web site root directory before selecting the redirect mode, otherwise IIS sometimes complained - not seriously but annoyingly.