Strange behavior

This is a discussion on Strange behavior within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hello I've been trying to solve the following issue on my Apache setup for a while but had no ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-05-2008
Pablo
 
Posts: n/a
Default 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
  #2 (permalink)  
Old 02-05-2008
Max Dittrich
 
Posts: n/a
Default Re: Strange behavior

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...acceptpathinfo

..max
  #3 (permalink)  
Old 02-05-2008
Pablo
 
Posts: n/a
Default Re: Strange behavior

On Feb 5, 8:39*am, Max Dittrich <max.dittr...@t-online.de> wrote:
> 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 -Shttp://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 -Shttp://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...acceptpathinfo
>
> .max


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

Pablo
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:45 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0