httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Forrest <jlforr...@berkeley.edu>
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.

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


Mime
View raw message