I use the following code to get the URL of current page.
thispage ="http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") & "?" & Request.Querystring
I want to check if user has typed the default document (index.asp) at the end of URL and remove it (by redirecting to the clean URL without default document in address bar).
But this code always contains the default document even when if not typed in address bar e.g. the code above returns http://example.com/index.asp when I have http://example.com in address bar.
How do I edit the above code to distinguish those URLs?