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 2003/10/12 23:20:56 UTC

DO NOT REPLY [Bug 23460] - mod_rewrite seems to use all lowercase URLs under Windows

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23460>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23460

mod_rewrite seems to use all lowercase URLs under Windows





------- Additional Comments From webmaster33@bigfoot.com  2003-10-12 21:20 -------
Now I'm sure it's not a config problem.
The problem also appears on Apache v1.3.28.

I would try to make clear the problem.
Test URL:
http://www.site.com/Computers/Printers/Cables/index.html

Using following rewrite rule I would like to use some part of the URL as input
into a script:
RewriteEngine on
RewriteRule ^(/.*)/index.html$   /script.cgi?cat=$1

The problem is, that $1 will be not "Computers/Printers/Cables", but
"computers/Printers/Cables".
The script input needs the category name in correct case, doesn't matter if we
use Unix or Windows.


But in rewrite_log.txt appears:
(3) [per-dir z:/dir/] add path-info postfix: z:/dir/computers ->
z:/dir/computers/Printers/Cables/index.html
(3) [per-dir z:/dir/] strip per-dir prefix:
z:/dir/computers/Printers/Cables/index.html -> computers/Printers/Cables/index.html
(3) [per-dir z:/dir/] applying pattern '^(.*)/index.html$' to uri
'computers/Printers/Cables/index.html'
(2) [per-dir z:/dir/] rewrite computers/Printers/Cables/index.html ->
/script.cgi?&cat=computers/Printers/Cables
(3) split uri=/script.cgi?&cat=computers/Printers/Cables -> uri=/script.cgi,
args=&cat=computers/Printers/Cables
(1) [per-dir z:/dir/] internal redirect with /script.cgi [INTERNAL REDIRECT]
(3) [per-dir z:/dir/] strip per-dir prefix: z:/dir/script.cgi -> script.cgi
(3) [per-dir z:/dir/] applying pattern '^(.*)/index.html$' to uri 'script.cgi'
(1) [per-dir z:/dir/] pass through z:/dir/script.cgi

Is that normal?
"computers/Printers/Cables" is inserted with $1, and not the expected
"Computers/Printers/Cables".

I know, it may be related to the Windows's case insensitive filesystem, however
the rewrite feature is wrong that way. Script inputs are case sensitive on all
systems, so mod_rewrite should be also case sensitive. Windows understands both
lowercase and uppercase paths, so paths with correct case from mod_rewrite are
treated well at system level.

I think the bug is at "add path-info postfix" action, since the base dir is not
"z:/dir" as would expected, but "z:/dir/computers".

Best regards,
Webmaster33
(using Apache v1.3.28)

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