Jump to content



Latest News: (loading..)

Issue Information

  • #000444

  • 0 - None Assigned

  • Won't FIx

  • 2.3.1

  • -

Issue Confirmations

  • Yes (1)No (0)
Photo

non-existing links containing index.php do NOT return 404 file not found

Posted by Biancoblu on 31 March 2012 - 10:00 AM

I have tested this with Gary on several oscommerce shops, including the osc demo on the official site, all exhibit the same behaviour:

Non-existing pages/links containing index.php do not return a 404 file not found response, instead they return a 200ok response.

Example:  http://demo.oscommerce.com/index.php/gaga returns a 200ok response

    http://demo.oscommerce.com/gaga returns a 404 file not found, which is correct.


Conclusion: only non-existing links containing index.php behave that way.

I wonder if you read my post at all.

Of course gaga is not a file, it's an example to show that a non-existing page/file/link which should return a 404 file not found response, returns a 200ok response instead.

Another example:

http://demo.oscommerce.com/index.php/this_is_not_a_file.php ------>returns a 200OK, when it should return a 404 file not found response.

BUT

http://demo.oscommerce.com/this_is_not_a_file.php -------> returns a 404 file not found, which is correct

index.php is a file. The apache response is correct. Would you say that after "/" mark not good to print something? But url friendly parameters must use it.
The parameters can folow "/" or "&" or "?" signs. Your examples works as parameters. If you dont like to use these links ask google webmester tools for excludes.

index.php is indeed a file, but this_is_not_a_file.php is not a file nor an existing page, therefore should return a 404 file not found response, at least that's what Google's guidelines are, when they say:

"Usually, when someone requests a page that doesn’t exist, a server will return a 404 (Not found) error. This HTTP response code clearly tells both browsers and search engines that the page doesn’t exist. As a result, the content of the page (if any) won’t be crawled or indexed by search engines. We recommend that you always return a 404 (Not found) or a 410 (Gone) response code in response to a request for a non-existing page."

Hi Isa, I agree with you. If something doesn't exist... it doesn't.
Pls test my dev. site to.
Sara

You can change the configuration of Apache to get the result you want.  See http://httpd.apache.org/docs/2.2/mod/core.html#acceptpathinfo

I would point out that your example URL not only returns a 200 status, it returns a page.  This is because index.php exists.  Once it matches index.php, Apache with AcceptPathInfo set to On does not keep looking for the rest of the path.  It just passes it to the application.

opps... not the same issue sorry. But similar there is the need to control duplicate pages

changed status to: Won't FIx

Matt (ecartz) is totally right.

Thanks Harald and Matt for the advice but I don't believe I have access to my server's Apache configuration :(