You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/12/12 19:05:32 UTC

DO NOT REPLY [Bug 41162] New: - Special chars and mod_rewrite on WinXP... not too goodc

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=41162>.
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=41162

           Summary: Special chars and mod_rewrite on WinXP... not too goodc
           Product: Apache httpd-2
           Version: 2.0.59
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: patzivota@hotmail.com


Hi,

I'm testing some things with mod_rewrite these days... at the moment, my
.htaccess file looks like this :

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*).def$ index.php?page=$1 [NE]

So, any URL ending with ".def" should be used as a parameter sent to index.php...

BUT, on WinXP, when writing a colon (:) or other chars like %, *, |, ... it
returns a 403 - Forbidden error...

If I change the .htaccess to this :

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*).def(.*)$ test.php?page=$1&query=$2 [NE,QSA]

The "forbidden" chars can be used ONLY if they are at least the second character
after ".def"...
So...
/te:st.def => 403
/test.def: => 403
/test.def/: => ok...

It looks like Apache is first trying to look if the file exists on the hard
drive, and since you can't have a file with ":" (and some other chars) in it,
Apache gets an error... IF it does, why does it checks on the hard drive ? AND,
why does it work after the ".def" ?!

Thanks,

Hubert L

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


DO NOT REPLY [Bug 41162] - Special chars and mod_rewrite on WinXP... not too goodc

Posted by bu...@apache.org.
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=41162>.
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=41162


wrowe@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From wrowe@apache.org  2006-12-13 18:11 -------
This isn't a support forum, take your configuration confusion to an appropriate
forum such as the user list.

Thanks Bob for your explanation to Hubert.

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


DO NOT REPLY [Bug 41162] - Special chars and mod_rewrite on WinXP... not too goodc

Posted by bu...@apache.org.
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=41162>.
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=41162





------- Additional Comments From bobsiegen@googlemail.com  2006-12-13 17:06 -------
This is not a bug.

> IF it does

Yes. You're in directory context, so a mapping on the filesystem occures by
walking through the folders level by level (directory walk).

> why does it work after the ".def"

Because for /test.def/: the folder /test.def/ doesn't exist, so r->filename
would be c:/programs/...../test.def and path-info would be the rest, which is
here /:

You don't have a mapping with a character which is not permitted in a filename
in this case.

You might want to use the rules in the server context instead before any
url-to-filename translation occures.

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