On Wed, Apr 22, 2009 at 12:48 PM, Tom Evans <tevans...@googlemail.com> wrote: > Ah yes, that is different. I actually wrote a module to manage this for > my servers (the canonical rewrite rule doesn't work in certain edge > cases), it doesn't detect it automatically based upon the vhosts > ServerName (it uses a directive), but that should certainly be possible. > Let me have a look this evening... > > Cheers > > Tom >
I am wondering if something like this is close (not even desk-checked) UseCanonicalname on RewriteCond %{HTTP_HOST} (.+) RewriteCond %{SERVER_NAME} !=%1 RewriteRule .* http://%{SERVER_NAME}$1 [R] or comedy single-condition option: RewriteCond %{HTTP_HOST},%{SERVER_NAME} !(.+),\1 RewriteRule .* http://%{SERVER_NAME}$1 [R] -- Eric Covener cove...@gmail.com --------------------------------------------------------------------- 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-unsubscr...@httpd.apache.org " from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org