Thank you Jim for your prompt response.
The property Request.ServerVariables("URL") returns the script name in the string; even though I navigated to the root address without specifying "default.asp"...
Address bar = "www.[mydomain].com/shop/"
Request.ServerVariables("URL") = "/shop/Default.asp"
Request.ServerVariables("SCRIPT_NAME") = "/shop/Default.asp"
Request.ServerVariables("PATH_INFO") = "/shop/Default.asp"
Explanations from DevGuru:
"URL" is the base portion of the URL.
"SCRIPT_NAME" is the virtual path to the calling script.
"PATH_INFO" is extra path information as given by the client.
(Having said that - I seem to get the result back for ALL three properties!)
Unfortunately it doesn't return "/shop/", which was what I was attempting to retrieve. The script name is always returned, not the true "raw" URL path that may have been entered into the address bar.
Therefore I believe this must be a limitation of classic ASP Request.ServerVariables collection object. From what I understand ASP.NET can do this using a new collection property called "Request.RawUrl".
Refer this thread: [webmasterworld.com...]
The whole purpose of this thread for me was to try and prevent a user identifying my technology used for my script language. With this limitation I cannot prevent the user from guessing the "default.asp" script name for my default documents. Maybe the solution to this lies in ISAPIREWRITE as my only option?
Moving along...in relation to your post and suggestion for handling 301-redirects; while I am unable to identify if the user types the script name into the browser or not (for default documents), how would I determine if I should perform a 301-redirect from "default.asp" to "/"?
My initial concern is that this could possibly cause a recursive loop, as i would have no idea if the address ends in "/" or "default.asp". Or I am missing something regarding 301-redirects or your suggestion?
I hope you understand :)