Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
How to find the redirection source page in error404.html using php?
Old 11-23-2004, 10:44 AM How to find the redirection source page in error404.html using php?
Average Talker

Posts: 16
Trades: 0
Hello,

I know that by checking the $_SERVER[REFERER] you could get the referer source. My question is how do you find the redirection source?

I have an error404.html page which is being redirected to if a 404 error is encountered when accessing my site. Now I would like to find out who redirected the broswer to the error404.html?

Thanks for your answer
__________________
Arthritis pain? try
Please login or register to view this content. Registration is FREE
Want to buy a cell phone? checkout
www.cellular-phone-reviews.net

Last edited by lubert; 11-23-2004 at 12:04 PM..
lubert is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-23-2004, 01:18 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
A minor issue, but the actual referer variable is $_SERVER[HTTP_REFERER]. See http://us2.php.net/reserved.variables.

As for your question, I don't know a painless way of doing this OTHER than to append a variable to the URL anytime you redirect to error404.html. For example, in document bob.php, use your redirection mechanism to redirect to error404.php?file=bob. Notice that I changed the extension of error404.html to .php with the implication that it will need to be PHP if you want to read the value of the file variable. You could add a little text on that page to show that the 404 page is being displayed because of a redirection from the page 'bob.'
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 11-23-2004, 01:49 PM
Average Talker

Posts: 16
Trades: 0
It is a pain. Maybe this should be a feature to be suggested to apache and php language.

Thanks for your reply.
__________________
Arthritis pain? try
Please login or register to view this content. Registration is FREE
Want to buy a cell phone? checkout
www.cellular-phone-reviews.net
lubert is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to find the redirection source page in error404.html using php?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.62003 seconds with 12 queries