Trying to do some SEO healing on an old (Classic) ASP site.
The main page has long been home.asp but we want all inbound links to go to the site root ("/") instead. Made the changes to the pages but now we need to do a redirect so we don't have broken legacy inbound links.
I basically want to do this:
<% if Request.ServerVariables("PATH_INFO") = "/home.asp" then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.mysite.com/"
end if %>
The problem is, that the PATH_INFO, SCRIPT_NAME, and PATH_TRANSLATED variables all return "/home.asp" even when I go to the site root. So it ends up in a never ending loop redirecting to itself.
Any ideas?
Edit
To clarify, I know that the default doc in IIS is set to home.asp and had already thought of the workaround suggested. However, I don't currently have the privileges to change it, which is why I'm asking here if there is any way to ask ASP what the URL the client used. It appears there is no way to do this, so I will petition for access to change the welcome page to something else.