Prev: Magento & SOAP2
Next: JPGraph error.
From: Alberto Lepe on 26 Feb 2010 04:39 Hello everyone, this is my first time in this mailing list. Using: PHP Version 5.2.10-2ubuntu6.4, Apache/2.2.12 I'm redirecting all the request into one file with ( .htaccess ): RewriteEngine On RewriteRule .* index.php My index code is: <?php echo $_SERVER["REDIRECT_URL"]; ?> In the same directory I just have other file besides index.php. And depends on how this file is named, I'm getting different values for the same request: Request: /menu.html Filename: menu.html Output: /menu.html Result: OK! Filename: menu.html.bak Output: /menu.html.bak Result: NOT GOOD! Filename: menu.html.whatever.other Output: ERROR 404 (from apache) Result: NOT GOOD! Could someone please explain me why I'm getting this weird behavior? As the request is the same, I expected to display always the same value. Am I'm wrong?? Thank you.
From: Ashley Sheridan on 26 Feb 2010 05:05 On Fri, 2010-02-26 at 18:39 +0900, Alberto Lepe wrote: > Hello everyone, this is my first time in this mailing list. > Using: PHP Version 5.2.10-2ubuntu6.4, Apache/2.2.12 > > I'm redirecting all the request into one file with ( .htaccess ): > > RewriteEngine On > RewriteRule .* index.php > > My index code is: > > <?php echo $_SERVER["REDIRECT_URL"]; ?> > > In the same directory I just have other file besides index.php. And > depends on how this file is named, I'm getting > different values for the same request: > > Request: /menu.html > > Filename: menu.html > Output: /menu.html > Result: OK! > > Filename: menu.html.bak > Output: /menu.html.bak > Result: NOT GOOD! > > Filename: menu.html.whatever.other > Output: ERROR 404 (from apache) > Result: NOT GOOD! > > Could someone please explain me why I'm getting this weird behavior? > > As the request is the same, I expected to display always the same > value. Am I'm wrong?? > > Thank you. > What weird behavior are you meaning? If you request menu.html.bak, that's what your PHP script will see a request for. I'm not quite sure I understand exactly what you expect to happen here. You make a request for '/menu.html'. Are you then saying you randomly get given back different output from your PHP? In the above examples, filename has no context, as you're not doing anything with any files in your PHP script. Thanks, Ash http://www.ashleysheridan.co.uk
|
Pages: 1 Prev: Magento & SOAP2 Next: JPGraph error. |