Permanent 301 Redirect from http:// to http://www.

Hi all ... having had a look around I cant find anything that quite suits the need so wondered if anybody here had a decent way of doing this?

I can obviously do this

:Response.Status = "301 Moved Permanently"
Response.AddHeader("Location", "/your-new-url/")
Response.End()


But how do I check to see if they have come from www. or not?
 
that works fine, ISAPI addons are not installed due to a major way in which it makes logs have errors.
 
I recently came across a solution where static websites on windows servers can essentially have a redirect for a non www domain to their www domain thats treated as a 301 redirect by the serach engines. I'm yet to test it but thought I'd share it here, I found it on Matt Cutts blog (google man)
just google 'canonical links'

I figure its a good option for sites with no .htaccess file or the option to add additional headers server side. I'd be interested to know if anyone has tried this approach yet.
 
Back
Top