Jump to content

[SOLVED] REQUEST_URI always returns "/404.php"


cthonus

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.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.