Hi
I've got a few sites running on my apache web server and would like to redirect non www to www at apache level, I.E instead of using .htaccess.
I have tried different methods but all seem to break apache and stop it from running.
Here's what I've got in my httpd-vhosts file:
<VirtualHost *:80>
ServerName domain.co.uk
ServerAlias *.domain.co.uk
#ServerAlias www.domain.co.uk domain.co.uk
DocumentRoot c:/www/webroot/test1
#Redirect 301 / [domain.co.uk...]
#RewriteEngine on
#RewriteCond %{HTTP_HOST} ^domain.co.uk
#RewriteRule (.*) [domain.co.uk$1...] [R=301,L]
</VirtualHost>
You'll see I've got several lines commented out, these are what I've tried but don't seem to work. At present the site is accessible using
http://domain.co.uk
and
http://www.domain.co.uk