httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40102] New: - SCRIPT_NAME set incorrectly with mod_rewrite
Date Mon, 24 Jul 2006 11:08:23 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40102>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40102

           Summary: SCRIPT_NAME set incorrectly with mod_rewrite
           Product: Apache httpd-2
           Version: 2.0.58
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: martel@post.pl


SCRIPT_NAME is passed incorrectly to PHP depending on where you place
the mod_rewrite rule. If it is placed in .htaccess or under <Directory>, the 
SCRIPT_NAME is initialized correctly but when you place the same rule under 
<VirtualHost> it is an empty string (or any other bogus value).

I wasn't sure if it was an Apache or PHP bug and I have posted it on PHP 
bugtracker first. They claim it's an Apache bug:

http://bugs.php.net/bug.php?id=38141

The rule I'm using is:

    RewriteEngine On
    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteCond %{SCRIPT_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1

Or (it's not relevant - both have the same result):

    RewriteEngine On
    RewriteRule !\.(js|ico|gif|jpg|png|css|swf)$ index.php

Apache2 PHP SAPI. Apache version is 2.0.58 but I guess it may not be
relevant as it was reported by number of people (though I don't know what their 
setups are). 

Tested on Gentoo Linux.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message