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

php redirect, back button to redirect page

Status
Not open for further replies.

doc1991

Technical User
Aug 22, 2008
3
IE
Hi,

Just wondering is it possible to use the header redirect method in php to enable this redirect page as the last viewed page.

redirect.php
Code:
header('Location: test.php');

So when the user has been redirected to test.php and then the user hits the back button they will be redirected to redirect.php rather than the last viewed page in the browser.

Essentially i want to create a kinda loop

Any help would be great

Thanx
 
sure. instead of redirecting to test.php, redirect to redirect.php.

or ... have mod_rewrite turned on and have everything go to index.php and then use php includes to pull down the right file dependent on the REQUEST_URI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top