I just bought the domain vas.im, I added a DNS rule for vas.im and www.vas.im, then I tried to get apache2 to redirect the latter to the former. I enabled mod_rewrite, appended /etc/apache2/httpd.conf
, which follows, and restarted the apache2 service.
ServerName localhost
AccessFileName .htaccess
# Redirect www to non-www
RewriteEngine On
RewriteEngine On
RewriteCond %{HTTP_HOST} ^[url]www.vas.im[/url] [NC]
RewriteRule ^(.*)$ [vas.im...] [L,R=301]
I must have made some mistake, since the www domain does not redirect. I don't pretend that I understand mod_rewrite, so I'm wondering if someone here knows what the issue is.