You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jon Forrest <jl...@berkeley.edu> on 2007/11/02 19:46:28 UTC
Re: [users@httpd] Very Puzzling Question About mod_rewrite (**Solved**)
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.
Cordially,
--
Jon Forrest
Unix Computing Support
College of Chemistry
173 Tan Hall
University of California Berkeley
Berkeley, CA
94720-1460
510-643-1032
jlforrest@berkeley.edu
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org