Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    $_SERVER['REQUEST_URI'] giving wrong Location

    I have created a 404 error page using PHP and .htaccess. The page comes up like it is supposed to, but the variable $_SERVER['REQUEST_URI'] outputs the 404 error page instead of the page that was called first. The code is:

    Page name: &lt;<?php echo htmlentities( $_SERVER['REQUEST_URI'] ); ?>&gt;

    ex. If I was going to the page http://mysite.com/aboutUs.htm and the page does not exist the 404 Error page will come up and the request uri variable outputs http://mysite.com/404error.php How do I get it to display the correct uri?
    Thanks
    Mathius

  • #2
    Regular Coder
    Join Date
    Nov 2002
    Location
    Manchester, UK
    Posts
    533
    Thanks
    4
    Thanked 1 Time in 1 Post
    it could be a server issue... I wrote an article for devarticles.com and a few people had that same problem...

    some replies here might help?
    http://forums.devarticles.com/showth...p?threadid=765


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •