> Take another look at mod_rewrite. This should do exactly what you want > RewriteRule /Foo(.*) c:/Folder/Foo$1 [NC] > (although I haven't used mod_rewrite much on win32, so I'm not > sure about the path syntax.
I'm writing off the list because this might be configuration/support issue ... Here is what I tried: at the top level in configuration I have (fragments): DocumentRoot "e:/Html/Content" RewriteEngine On RewriteLog e:\Html\Logs\rewrite.log RewriteLogLevel 9 RewriteRule /Bob(.*) /Bob$1 [NC] <Directory "e:/Html/Content/Bob"> Order allow,deny Allow from all DirectoryIndex index.html </Directory> In my filesystem I have the e:/Html/Bob/index.html file To the request: http://hera/BoB The browser reports: Bad request! Your browser (or proxy) sent a request that this server could not understand. If you think this is a server error, please contact the webmaster Error 400 hera 07/21/02 15:32:16 The rewrite log file shows (fragments): 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#55f700/initial] (2) init rewrite engine with requested uri /BoB 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#55f700/initial] (3) applying pattern '/Bob(.*)' to uri '/BoB' 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#55f700/initial] (2) rewrite /BoB -> /Bob 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#55f700/initial] (2) local path result: /Bob 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#560958/initial/redir#1] (2) init rewrite engine with requested uri /error/HTTP_BAD_REQUEST.html.var 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#560958/initial/redir#1] (3) applying pattern '/Bob(.*)' to uri '/error/HTTP_BAD_REQUEST.html.var' 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#560958/initial/redir#1] (1) pass through /error/HTTP_BAD_REQUEST.html.var 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#567720/subreq] (2) init rewrite engine with requested uri /error/include/top.html 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#567720/subreq] (3) applying pattern '/Bob(.*)' to uri '/error/include/top.html' 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#567720/subreq] (1) pass through /error/include/top.html 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#567720/subreq] (2) init rewrite engine with requested uri /error/include/bottom.html 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#567720/subreq] (3) applying pattern '/Bob(.*)' to uri '/error/include/bottom.html' 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#567720/subreq] (1) pass through /error/include/bottom.html 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#569728/subreq] (2) init rewrite engine with requested uri /error/contact.html.var 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#569728/subreq] (3) applying pattern '/Bob(.*)' to uri '/error/contact.html.var' 192.168.2.6 - - [21/Jul/2002:15:26:59 --0400] [hera/sid#2fb658][rid#569728/subreq] (1) pass through /error/contact.html.var Now I modified the configuration to say: RewriteRule /Bob(.*) /Bob$1 [NC,PT] This time the request: http://hera/BoB is serverd successfully, however in the address bar I see: http://hera/Bob/ so the rewrite made it to the user... This is the fragment of the rewrite log this time: 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#55f700/initial] (2) init rewrite engine with requested uri /BoB 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#55f700/initial] (3) applying pattern '/Bob(.*)' to uri '/BoB' 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#55f700/initial] (2) rewrite /BoB -> /Bob 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#55f700/initial] (2) forcing '/Bob' to get passed through to next API URI-to-filename handler 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#55f700/initial] (2) init rewrite engine with requested uri /Bob/ 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#55f700/initial] (3) applying pattern '/Bob(.*)' to uri '/Bob/' 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#55f700/initial] (2) rewrite /Bob/ -> /Bob/ 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#55f700/initial] (2) forcing '/Bob/' to get passed through to next API URI-to-filename handler 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#561708/subreq] (2) init rewrite engine with requested uri /Bob/index.html 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#561708/subreq] (3) applying pattern '/Bob(.*)' to uri '/Bob/index.html' 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#561708/subreq] (2) rewrite /Bob/index.html -> /Bob/index.html 192.168.2.6 - - [21/Jul/2002:15:36:49 --0400] [hera/sid#2fb658][rid#561708/subreq] (2) forcing '/Bob/index.html' to get passed through to next API URI-to-filename handler So now I don't quite know what is wrong. 1. Is the [PT] necessary? From documentation I didn't understand it to be. >From your example it didn't seem to be required either. But without it, it just doesn't work. 2. Using rewrite I get to see the changes at the client, which is not what I wanted. So what is wrong? Thanx Adrian ----- Original Message ----- From: "Joshua Slive" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 21 July, 2002 14:41 Subject: Re: Case insensitive issues > > On Sun, 21 Jul 2002, Adrian Grajdeanu wrote: > > > mod_rewrite does solve the problem of case insensitve need. However it is > > not what I like. It modifies the request in such a way that it is visible to > > the client. Why should the client care or even know the details of the > > server and its configuration and layout? In trying to avoid such disclosure > > I would prefer against mod_rewrite and for mod_alias in this case. Am I > > mistaken? > > Take another look at mod_rewrite. This should do exactly what you want > RewriteRule /Foo(.*) c:/Folder/Foo$1 [NC] > (although I haven't used mod_rewrite much on win32, so I'm not > sure about the path syntax. > > In fact, I'm fairly sure that there is nothing that you can do with > mod_alias that can't also be done with mod_rewrite. > > > Especially I am curious about the Location vulnerability that case > > insensitive filesystems open up, while the Location name can be case > > sensitive only. > > I solve that by telling people NEVER to use <Location> when trying to > protect something on the filesystem. That is what <Directory> is for. > > Joshua. >