php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25135 Strange redirection issue on missing page
Submitted: 2003-08-18 18:01 UTC Modified: 2003-08-19 11:59 UTC
From: kraj at illumen dot com Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.3.3RC4 OS: FreeBSD 4.8
Private report: No CVE-ID: None
 [2003-08-18 18:01 UTC] kraj at illumen dot com
Description:
------------
OS - FreeBSD 4.8
PHP Version 4.3.3 RC2
Apache 1.3.28

We migrated a website which was totally static html to a new php site.  The search engines still point to pages on the old website.

The old website had a directory structure breaking up the site into sections.  The new website has a php script for each section.

As an example, the old website had a page access via the following URL:

http://www.icetips.com/sql/mysqlpageloading.htm 

If one tries to link to this page, instead of the document not found page which is normally issued, the engine is running the script called sql.php located on the document root, but none of the links work because it believes that the base for the relative URL's is http://www.icetips.com/sql/

THe proper behavior should be to display the ErrorDocument.

I am not sure if this is a problem caused by Apache or by PHP.  If I try to retrieve a page with a directory for which there is no php script with the name (less the extension) which is the same as the bogus directory then we are being redirected to the ErrorDocument properly.

For example:

http://www.icetips.com/whatever/whenever.html

Could not test with either RC3 or RC4 because the ports collection does not have those sources available at this time.



Reproduce code:
---------------
Access URL

http://www.icetips.com/sql/mysqlpageloading.htm 

result in script

http://www.icetips.com/sql.php

being executed

Expected result:
----------------
Should display the ErrorDocument

Actual result:
--------------
Displays http://www.icetips.com/sql.php setting base directory to http://www.icetips.com/sql/


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-18 18:02 UTC] kraj at illumen dot com
Forgot to mention - running Turck-MMCache
 [2003-08-18 18:05 UTC] kraj at illumen dot com
http://www.icetips.com/sql/ runs http://www.icetips.com/sql.php
 [2003-08-18 18:05 UTC] iliaa@php.net
Can you replicate the problem without Turck-MMCache?

 [2003-08-19 02:38 UTC] derick@php.net
You might also want to turn of MultiViews in your apache config if you have that on.
 [2003-08-19 11:50 UTC] kraj at illumen dot com
Turned of Turck-MMCache and problem persisted.

Checked apache config - MultiViews was enabled.
Disabling MultiViews solved the problem.

Thank you!
 [2003-08-19 11:59 UTC] derick@php.net
Right, not a PHP bug -> bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 21:01:33 2024 UTC