Re: Autosearch Redirection

From: Date: Sun, 21 Dec 2003 10:02:06 +0000
Subject: Re: Autosearch Redirection
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-22645@lists.php.net to get a copy of this message
Hi Erling! Do a complete printout of the $_SERVER variables, and you will see, where you can get the original URI. Regards, Gabor Hojtsy Erling wrote:
Hello,
    I've been using PHP for upwards of 3-4 years, and one of the things I love about the language is the beautiful setup of the online documentation.  Now, I want to setup something similar on my own website, just for the ease of use.  And looking through your files, it seems like you're using the $_SERVER['REQUEST_URI'] to get what the user typed into the address bar, but when I try to do it that way, I just get the URI of the custom error page.  So I was wondering if you could shed some light on this.  This is what I have setup:
#---------------------------------------------------------------------------------------------------------------------# FILE: .htaccess #---------------------------------------------------------------------------------------------------------------------# ErrorDocument 404 http://www.sonofthor.com/fc/error_404.php #---------------------------------------------------------------------------------------------------------------------# #---------------------------------------------------------------------------------------------------------------------# FILE: error_404.php #---------------------------------------------------------------------------------------------------------------------# <?php
    print $_SERVER['REQUEST_URI'];
?> #---------------------------------------------------------------------------------------------------------------------# Every time I try to access a page that will give me a 404 error, it's redirects me to the error_404.php page, but it prints: /fc/error_404.php Thank you for your time, Erling 'FinalMjolnir' Thorkildsen


« previous php.mirrors (#22645) next »