On Mon, Dec 10, 2001 at 12:48:36AM -0600, Ian Bicking wrote:
> >   RewriteRule ^/.*$ /wk/MySite/ [R]
> > 
> > or something like that should do it, BUT you can't do any non webkit 
> > stuff from Apache with this configuration.
> > 
> > A better approach would be to map each sub directory in your Servlet 
> > dir with multiple RewriteRules:
> > 
> >   RewriteRule ^/Products/.*$ /wk/MySite/Products/ [R] 
> >   RewriteRule ^/Services/.*$ /wk/MySite/Services/ [R] 
> >   etc.
> 
> There should also be a way to trap static files.  Perhaps like:
> 
> RewriteRule ^(.*\.jpg)$ $1 [L]

Or to make explicit that the original URL will be used unchanged:

        RewriteRule ^(.*\.jpg)$  -  [L]

> Or:
> 
> RewriteRule ^(.*\.)(html|gif|jpg|png|zip|tar\.gz) $1$2 [L]

Ditto.

        RewriteRule ^(.*\.)(html|gif|jpg|png|zip|tar\.gz)  -  [L]

> I'm not sure if you need to put /path/to/root/$1 on the second
> argument... maybe Apache will pick it up from your DocumentRoot, but I'm
> not sure.

By /path/to/root, do you mean the parent directories of the document
root?  No, because mod_rewrite operates on URLs, not directories.
Exposing the parent directories of your document root will only cause a
not-found errori.  (As well as revealing your filesystem directory
structure to a potential cracker).

I don't think you can use mod_rewrite to map into a directory that's
not also inside the document root.  Instead, use a symlink and turn the
"FollowSymLinks" option on.

> http://webware.colorstudy.net/twiki/bin/view/Webware/ModRewriteRecipes

Added the "-" example.

-- 
-Mike (Iron) Orr, [EMAIL PROTECTED]  (if mail problems: [EMAIL PROTECTED])
   http://iron.cx/     English * Esperanto * Russkiy * Deutsch * Espan~ol

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to