How do I get the address that is in the users browser?
BRCMarketing
8:05 pm on Aug 22, 2006 (gmt 0)
www.mysite.com/default.asp
vs.
www.mysite.com/ (assuming default.asp is the default document)
How can I know what the user has in their address bar?
I tried Request.ServerVariables("URL") but that returns /default.asp either way.
aspdaddy
9:20 pm on Aug 22, 2006 (gmt 0)
Try these too - HTTP_HOST, SCRIPT_NAME, PATH_INFO You might need to join a couple together to get the actual url.
BRCMarketing
12:37 pm on Aug 23, 2006 (gmt 0)
Unfortunately none of those work either...
anyone have any other ideas?
carlb007
1:38 pm on Aug 23, 2006 (gmt 0)
you could maybe use a redirect the first time the page is loaded that then sends it back to the same place. Then use: HTTP_REFERER to check the page that it came from?
Im not sure if it picks the variable up on a redirect tho, or whether it requires a physical link or click by a user. Something to try though...
When requests are made to the default directory, the path_info shows the name of your default document (in this case default.asp) rather than "hostname/".
I'll install IIS and play with it.
Bill
mrMister
12:47 pm on Sep 1, 2006 (gmt 0)
Override the default rewriting mechanism in IIS using something like ISAPI_Rewrite (in which case, you'll get an X header telling you where the original request came from)
Otherwise use Javascript to retrieve the contents on the client's browser and have it send the data to your server using AJAX.