View Single Post
Old 06-17-2007, 07:08 PM   #2 (permalink)
bomy
Inactive
 
Join Date: 06-17-07
Posts: 6
iTrader: 0 / 0%
Latest Blog:
None

bomy is liked by many
Code

Sorry forgot to include the code.


Dim Domain_Name, theURL, QUERY_STRING, HTTP_PATH
Domain_Name = lcase(request.ServerVariables("HTTP_HOST"))
if domain_name <> "www.example.com" Then
HTTP_PATH = request.ServerVariables("PATH_INFO")
If Left(HTTP_PATH, = "/default" Then
HTTP_PATH = ""
End If
QUERY_STRING = request.ServerVariables("QUERY_STRING")
theURL = "http://www.example.com" & HTTP_PATH
if len(QUERY_STRING) > 0 Then
theURL = theURL & "?" & QUERY_STRING
end if
Response.Clear
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", theURL
Response.Flush
Response.End
end if
bomy is offline   Reply With Quote