f



Strange behavior

Hello

   I've been trying to solve the following issue on my Apache setup
for a while but had no luck so far :

   Platform
   Linux RHEL 4.0
   Apache 2.0.63 / PHP 5.2.5

   1. wget -S http://mysite.com/index.php
  --22:05:35--  http://mysite.com/index.php
  Resolving mysite.com... xx.xx.xx.xx
  Connecting to mysite.com|xx.xx.xx.xx|:80... connected.
  HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Date: Tue, 05 Feb 2008 00:05:36 GMT
  Server: Apache
  Expires: Thu, 19 Nov 1981 08:52:00 GMT
  Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
  Pragma: no-cache
  Vary: Accept-Encoding
  Connection: close
  Content-Type: text/html; charset=ISO-8859-1
  Length: unspecified [text/html]

   so far so good, now look at the following result :

  2. wget -S http://mysite.com/index.php/asd/asd/asd/asd
--22:08:11--  http://mysite.com/index.php/asd/asd/asd/asd
  Resolving mysite.com... xx.xx.xx.xx
  Connecting to mysite.com|xx.xx.xx.xx|:80... connected.
  HTTP request sent, awaiting response...
  HTTP/1.0 200 OK
  Server: Apache
  Content-Type: text/html; charset=utf-8
  Date: Tue, 05 Feb 2008 00:08:13 GMT
  Connection: close
  Length: unspecified [text/html]

    instead of returning an HTTP 404 Status Code it is answering with
a 200, no matter what I type after 'index.php' starting with a slash
it will return the 'index.php' file.

    Any ideas on how to fix this behavior ? I would really appreciate
any help,

  Pablo
0
Pablo
2/5/2008 12:15:25 AM
comp.infosystems.servers.unix 3274 articles. 0 followers. Post Follow

2 Replies
979 Views

Similar Articles

[PageSpeed] 7

Hi

Am Mon, 4 Feb 2008 16:15:25 -0800 (PST) schrieb Pablo:

> Hello
> 
>    I've been trying to solve the following issue on my Apache setup
> for a while but had no luck so far :
> 
>    Platform
>    Linux RHEL 4.0
>    Apache 2.0.63 / PHP 5.2.5
> 
>    1. wget -S http://mysite.com/index.php
>   --22:05:35--  http://mysite.com/index.php
>   Resolving mysite.com... xx.xx.xx.xx
>   Connecting to mysite.com|xx.xx.xx.xx|:80... connected.
>   HTTP request sent, awaiting response...
>   HTTP/1.1 200 OK
[...]
> 
>    so far so good, now look at the following result :
> 
>   2. wget -S http://mysite.com/index.php/asd/asd/asd/asd
> --22:08:11--  http://mysite.com/index.php/asd/asd/asd/asd
>   Resolving mysite.com... xx.xx.xx.xx
>   Connecting to mysite.com|xx.xx.xx.xx|:80... connected.
>   HTTP request sent, awaiting response...
>   HTTP/1.0 200 OK
[...]
> 
>     instead of returning an HTTP 404 Status Code it is answering with
> a 200, no matter what I type after 'index.php' starting with a slash
> it will return the 'index.php' file.
> 
>     Any ideas on how to fix this behavior ? I would really appreciate
> any help,

You can override the default behavior by setting AcceptPathInfo to Off
    http://httpd.apache.org/docs/2.0/mod/core.html#acceptpathinfo

..max
0
Max
2/5/2008 10:39:18 AM
On Feb 5, 8:39=A0am, Max Dittrich <max.dittr...@t-online.de> wrote:
> Hi
>
> Am Mon, 4 Feb 2008 16:15:25 -0800 (PST) schrieb Pablo:
>
>
>
>
>
> > Hello
>
> > =A0 =A0I've been trying to solve the following issue on my Apache setup
> > for a while but had no luck so far :
>
> > =A0 =A0Platform
> > =A0 =A0Linux RHEL 4.0
> > =A0 =A0Apache 2.0.63 / PHP 5.2.5
>
> > =A0 =A01. wget -Shttp://mysite.com/index.php
> > =A0 --22:05:35-- =A0http://mysite.com/index.php
> > =A0 Resolving mysite.com... xx.xx.xx.xx
> > =A0 Connecting to mysite.com|xx.xx.xx.xx|:80... connected.
> > =A0 HTTP request sent, awaiting response...
> > =A0 HTTP/1.1 200 OK
> [...]
>
> > =A0 =A0so far so good, now look at the following result :
>
> > =A0 2. wget -Shttp://mysite.com/index.php/asd/asd/asd/asd
> > --22:08:11-- =A0http://mysite.com/index.php/asd/asd/asd/asd
> > =A0 Resolving mysite.com... xx.xx.xx.xx
> > =A0 Connecting to mysite.com|xx.xx.xx.xx|:80... connected.
> > =A0 HTTP request sent, awaiting response...
> > =A0 HTTP/1.0 200 OK
> [...]
>
> > =A0 =A0 instead of returning an HTTP 404 Status Code it is answering wit=
h
> > a 200, no matter what I type after 'index.php' starting with a slash
> > it will return the 'index.php' file.
>
> > =A0 =A0 Any ideas on how to fix this behavior ? I would really appreciat=
e
> > any help,
>
> You can override the default behavior by setting AcceptPathInfo to Off
> =A0 =A0http://httpd.apache.org/docs/2.0/mod/core.html#acceptpathinfo
>
> .max

You are right, just applied the fix and works ok, thank you.

 Pablo
0
Pablo
2/5/2008 1:04:17 PM
Reply: