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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect problem

Status
Not open for further replies.

myatia

Programmer
Nov 21, 2002
232
Hi,

I have a script called "redirect.asp" that redirects to a remote site. On that site, the referring page is checked, and if it equals " the person is automatically logged into the remote site. If it does not, then they're shown a login error message.

The problem is that when I navigate to " and click on the link to "redirect.asp", the referrer detected on the remote site is "testfile.asp" instead of "redirect.asp". It's like "redirect.asp" was never visited. It seems to me that since "redirect.asp" was the last page on my site I was at, this should show up as the referrer.

Does anyone know what's up and if there's a workaround?

Thanks much,

Misty
 
Redirection replaces the page redirected from with page redirected to in the page history. That means that the redirecting page doesn't exist in the history. If you want to check, use something like


in the redirecting page and then check for that value in testfile.asp.

Lee
 
Is there any way to manually set the referrer to "redirect.asp"? Or, would using a meta tag refresh instead of an ASP refresh ensure that the referring page would show up as "redirect.asp"?

Any help would be appreciated.

Misty
 
If on the referring page you used:

<script language="javascript">
document.location.href='</script>

you might get the results you want. Haven't tested it, though. I suspect that the referrer actually has to have loaded on the client computer browser, where with ASP a redirection is done without contacting the client-side computer, where the document history resides. The meta-refresh might work, as well, but you'll have to try it.

Lee
 
I'll try the meta refresh and javascript tests. Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top