View Single Post
  #1 (permalink)  
Old 08-16-2007, 12:20 PM
tamecrow's Avatar
tamecrow tamecrow is offline
WebProWorld Veteran
 
Join Date: Aug 2007
Location: United Kingdom
Posts: 330
tamecrow RepRank 2
Default 301 redirect - index.asp to domain root

Hi all,

Our site has been having a bit of trouble recently, and something has just occurred to me. Although we have http://domain.com redirected to http://www.domain.com, we don't have http://www.domain.com/index.asp redirected to http://www.domain.com.

Now, putting a simple ASP redirect on index.asp, similar to the following...

Code:
If LCASE(Left(Request.ServerVariables("HTTP_HOST"),4)) <> "www." then
    Response.Status = "301 Moved Permanently"
    Response.AddHeader "Location", "http://www.domain.com"
    Response.End
End If
... will just put the server into an infinite loop. Basically, is there any way to create an SEO-safe ASP redirect from the index file to domain root? Although I hate to state the obvious, I feel we could have some dupe content issues here.
Reply With Quote