Charles Palmer wrote:
RewriteCond %{HTTP_HOST} ^[^\.w{3}]+\.wl.example.com$
That won't work. Your expression [^\.w{3}] is invalid. This is a character class stating that the chars }3w.{ must not be present. You're looking for a negative lookahead, (?!www)
Do you have access to your httpd.conf? If yes, you should place the rewrite rules there (per-server context):
# don't mark the end of string with $ here, a port might follow RewriteCond %{HTTP_HOST} ^((?!www)[a-z]+)\.wl\.example\.com RewriteRule ^/$ /%1/ [PT] or this example, which would be more precise, RewriteCond %{HTTP_HOST} ^([a-z]+)\.wl\.example\.com RewriteCond %1 !=www RewriteRule ^/$ /%1/ [PT] -- Bob --------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx