Forum Moderators: phranque
I've got everything set up so that the site serves from the IP address and the 2 domains (they point to the root,not virtual servers).
The problem is when I put in .htaccess as shown below it causes a server error (500)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.co.uk [NC]
RewriteRule ^/(.*) http://www.example.co.uk/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^/(.*) http://www.example.co.uk/$1 [R=301,L]
It is supposed to send all requests to www.example.co.uk rather than either the non-www or .com versions.
I have a feeling that I need to set up virtual servers for it to know where to get the data, either that or there is a basic error in my .htaccess
Any help would be good
Thanks