You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by john <is...@cc.uoi.gr> on 2008/02/15 12:26:50 UTC

[users@httpd] Apache handles filename/something

Hi all

When I type http://server/index.php i can see the index.php
But when I type http://server/index.php/1234 i can also see the index.php

I assume that Apache handles index.php as a directory or alias and does not
give the 404 error code but 304 or 200.

Any thoughts on that?





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache handles filename/something

Posted by Michael McGlothlin <mi...@swplumb.com>.
>> So, is there any way to force a 404 error when someone uses /something ?
>>     
You could use mod rewrite or have your script check for it and generate 
a 404 error.

-- 
Michael McGlothlin
Southwest Plumbing Supply


Re: [users@httpd] Apache handles filename/something

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, Feb 15, 2008 at 6:39 AM, john <is...@cc.uoi.gr> wrote:
> So, is there any way to force a 404 error when someone uses /something ?

Depending on your apache version, see the AccepPathInfo directive.
http://httpd.apache.org/docs/2.2/mod/core.html#acceptpathinfo

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache handles filename/something

Posted by john <is...@cc.uoi.gr>.
So, is there any way to force a 404 error when someone uses /something ?


-----Original Message-----
From: Nick Kew [mailto:nick@webthing.com] 
Sent: Friday, February 15, 2008 1:31 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache handles filename/something

On Fri, 15 Feb 2008 13:26:50 +0200
"john" <is...@cc.uoi.gr> wrote:

> Hi all
> 
> When I type http://server/index.php i can see the index.php
> But when I type http://server/index.php/1234 i can also see the
> index.php

The term you're looking for in TFM is PATH_INFO.

> I assume that Apache handles index.php as a directory or alias and
> does not give the 404 error code but 304 or 200.

In the case of a script, the script gets to decide.  But yes, it
defaults to 200 if it runs successfully.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache handles filename/something

Posted by Nick Kew <ni...@webthing.com>.
On Fri, 15 Feb 2008 13:26:50 +0200
"john" <is...@cc.uoi.gr> wrote:

> Hi all
> 
> When I type http://server/index.php i can see the index.php
> But when I type http://server/index.php/1234 i can also see the
> index.php

The term you're looking for in TFM is PATH_INFO.

> I assume that Apache handles index.php as a directory or alias and
> does not give the 404 error code but 304 or 200.

In the case of a script, the script gets to decide.  But yes, it
defaults to 200 if it runs successfully.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org