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

PHP 404 Error Page with redirect

Status
Not open for further replies.

jonperks

Programmer
Nov 19, 2003
40
GB
Hi

I've got a php custom 404 error page set up no problem, however I want to take what the user adds after the slash and redirect based on that. for example


I want to take the "jon" and redirect to a page with jon as a query string. I have looked up a lot about this and believe that "$_SERVER['REDIRECT_URL']
 
It missed some of my post off?

My problem is that $_SERVER['REDIRECT_URL'] returns /404.php which is the page where I am calling it from, what I thought it should be returning is the the information of the error page, so


would output "jon" as this page doesn't exist and therefore opens the custom 404 page? most out the $_SERVER parts return blank I'm not sure why?

Any ideas...
 
sorry REQUEST_URI, neither work properly though, i think its something about apache, i guess my server wont work but is there an alternative?
 
Yep sorted this out now, and created the next problem for myself...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top