Jump to content

Recommended Posts

Been trying to figure this one out most of the evening.

 

My .htaccess file contains "ErrorDocument 404 /404.php"

 

The php code on the 404 page is simply

 

<?php echo $REQUEST_URI ?>

 

followed by some standard blurb.

 

This always returns "/404.php" regardless of what I type into the address bar.

 

Any help gratefully received.

Link to comment
https://forums.phpfreaks.com/topic/46941-solved-request_uri-always-returns-404php/
Share on other sites

Hrm. That returned blank.

 

Have done a phpinfo() list and see the variable I need appears to be $DOCUMENT_URI.

 

In my ignorance I assumed such things would be more or less standardised in php though I guess that because it's a server variable it's down to each installation...

 

Thank you so much for your quick response though! Much appreciated.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.