Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTTP_REFERER - F1 please - Tricky situation. 1

Status
Not open for further replies.

Deadline

Programmer
Feb 28, 2001
367
US
HTTP_REFERER
Returns a string containing the URL of the page that referred the request to the current page, but does not include redirect requests

The above is the definition given for HTTP_REFERER in MSDN. My doubt is, when I make a redirect, how to capture the source page from the target page?

Very urgent.. Help please..
Thanks!

RR


 
when you do a response.redirect, pass along the script_name

ex:
dim sn
sn = Server.RequestVariables("SCRIPT_NAME")
'sn now contains the value of the current script

Response.redirect("somepage.asp?sn=" &sn)

hope this helps
leo
 
Thanks Leo.

I actually incorporated your logic, albeit in a slightly different fashion..

I actually used Javascript(window.href) property to capture the current file name.

And passed it on to a login page, where this source page's name is stored in a Hidden Text box named, 'Success'

and in another hidden box, named 'failure' the login page's URL is stored.

When the user is successfully logs in, then she/he will be taken to the URL in the SUCCESS box.

This approach works, but if you find any potential short comings, please comment.


Many Thanks!

RR


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top