httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Forrest <>
Subject Re: [users@httpd] Very Puzzling Question About mod_rewrite (**Solved**)
Date Fri, 02 Nov 2007 18:46:28 GMT
Krist van Besien wrote:

> However since it is /username/ that you need to replace with
> /username/public_html/ it shouldn't be that hard.
> RewriteRule   ^`/(\w+)/(.+)$               /$1/public_html/$2    [L]

This was very close. With the expert help of a local Apache
guru, we came up with the following, which appears to work:

RewriteRule         ^/(.+?)/(.*)$    /$1/public_html/$2      [L]

It's critical that the first part of the regular expression
use minimal matching.

Thanks for everyone's help.

Jon Forrest
Unix Computing Support
College of Chemistry
173 Tan Hall
University of California Berkeley
Berkeley, CA

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message