Redirection Clarification

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
x81kilo
Forum Newbie
Posts: 1
Joined: Mon Sep 19, 2005 11:08 am

Redirection Clarification

Post by x81kilo »

G'Day All,

I am wondering, I have been reading on redirection on the web and found this site. Is there a way to say
have a website page A that redirects to page B, but page B will check to ensure that page A is the only one who can redirect to it (page B)?

therefore not allowing any other page to redirect to it but page A?

can u show example of this to me? I am new to HTML/PHP and am learning alot thanks to groups like this and the vastness of info on the internet.


Thanks in advance,

-- x81kilo out !!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Moved to PHP - Code.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Re: Redirection Clarification

Post by feyd »

x81kilo wrote:I am wondering, I have been reading on redirection on the web and found this site. Is there a way to say
have a website page A that redirects to page B, but page B will check to ensure that page A is the only one who can redirect to it (page B)?
There are many ways, however few are reliable. Checking the HTTP Referrer value is probably the easiest, but could easily make lots of false-positives (their browser/connection doesn't send the header.) Using sessions could work decently... using a very random, one time use link works well, but is more difficult to set up...

The degree of difficulty you should go through depends on how much you really need the redirection to only work for one URL.. which seems a bit silly really..
Post Reply