Vroomfondel
02-11-2000, 07:03 PM
I'm trying to customize my 404 Error page to let people notify me of bad links. I've written a basic PHP form mail script and embedded the code on the 404 page. What I want the thing to do is take the referring URL and the requested file, write them into the form text areas and have a "notify me" button under it. That'll make it a snap to find and correct bad links.
I've gotten everything to work except for one sticking point. The 404.php3 is always written into the $REQUEST_URI value in the following code:
<TR>
[nbsp][nbsp] <TD VALIGN="TOP"><TEXTAREA COLS="50" ROWS="2" NAME="textarea">Referring URL: <? print $HTTP_REFERER ?></TEXTAREA></TD>
[nbsp][nbsp]</TR>
[nbsp][nbsp]<TR>
[nbsp][nbsp] <TD VALIGN="TOP"><TEXTAREA COLS="50" ROWS="2" NAME="textarea">Requested File: <? print $REQUEST_URI ?></TEXTAREA></TD>
[nbsp][nbsp]</TR>
So it's returning the proper value for $HTTP_REFERER, but since the 404.php3 page is called for errors, that's the value that gets returned for $REQUEST_URI instead of the file that was actually requested. Is there any way to make the script hold the proper requested value instead of having that value overwritten when the 404 page is called?
Never mind (in best Emily Litella impression), figured out what was happening.
[This message has been edited by Vroomfondel (edited 02-12-00@4:49 pm)]
I've gotten everything to work except for one sticking point. The 404.php3 is always written into the $REQUEST_URI value in the following code:
<TR>
[nbsp][nbsp] <TD VALIGN="TOP"><TEXTAREA COLS="50" ROWS="2" NAME="textarea">Referring URL: <? print $HTTP_REFERER ?></TEXTAREA></TD>
[nbsp][nbsp]</TR>
[nbsp][nbsp]<TR>
[nbsp][nbsp] <TD VALIGN="TOP"><TEXTAREA COLS="50" ROWS="2" NAME="textarea">Requested File: <? print $REQUEST_URI ?></TEXTAREA></TD>
[nbsp][nbsp]</TR>
So it's returning the proper value for $HTTP_REFERER, but since the 404.php3 page is called for errors, that's the value that gets returned for $REQUEST_URI instead of the file that was actually requested. Is there any way to make the script hold the proper requested value instead of having that value overwritten when the 404 page is called?
Never mind (in best Emily Litella impression), figured out what was happening.
[This message has been edited by Vroomfondel (edited 02-12-00@4:49 pm)]