Forum Moderators: open

Message Too Old, No Replies

Setting up 301 redirect - have got the code

But there's a glitch

         

millie

1:12 pm on Feb 6, 2004 (gmt 0)

10+ Year Member



Trying to redirect example.com to www.example.com.

I've got the code I need but still can't make it work.

To do a 301 redirect do I need to have 2 sites set up in IIS - one with www. and one without? At the moment the site is set up as example.com and there is an alias set up in the DNS that allows people to access the domain using the www.

Zaphod Beeblebrox

1:14 pm on Feb 6, 2004 (gmt 0)

10+ Year Member




<%
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "www.yourdomain.com"
Response.End
%>