1

[ubuntu] what is the best possible way to redirect and rewrite

view story
linux-howto

http://ubuntuforums.org – what is the best possible way to redirect and rewrite url in virtual host file? I want to make sure it is not heavy on the server. I tried many ways on the virtualhost file but when I restart the apache it fails. I dont want to use .htaccess... as far as I know that creates too much back and forth. lets say I want to redirect w.domain.com ww.domain.com www.www.domain.com www.wwww.domain.com wwww.domain.com to www.domain.com how would you do it? I tried for starters it failed when I restarted apache RewriteEngine On RewriteCond %{HTTP_HOST} !^domain\.com$ RewriteRule ^/(.*)$ http://www. (Hardware)