httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o o <>
Subject [users@httpd] Help with mod_rewrite and regex's
Date Mon, 23 May 2005 23:55:17 GMT
I have the following config:

<Directory "/usr/local/www/vhosts-test/*/htdocs">
RewriteEngine On
RewriteBase   /
# Redirect <subdomain><path> to<subdomain>/<path>
# Skip rewrite if no hostname, if the requested
subdomain is www, or if image request 
RewriteCond %{HTTP_HOST} !(^$&^www\.) [NC]
RewriteCond %{REQUEST_URI} !^/images/
RewriteCond %{HTTP_HOST}<>%{REQUEST_URI}
^([^.]+)\.example\.com(:80)?<>/([^/]*) [NC]
RewriteCond %1<>%3 !^(.*)<>\1$ [NC]
RewriteRule ^(.*) %1 [L]

This config works for testing purposes. However, I
want it to work as part of a larger mass vhost block,
so I need to change the RewriteConditions to meet that
requirement. So basically I need the above RewriteCond
statements changed to match wildcarded domains instead
of Hopefully someone with a better grasp
of pcre/regexes can help me out here.TIA

Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site

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