I’m having a really strange issue with .htaccess – I’m trying to rewrite the domain so it always prepends www to the domain when loaded – this works for about five minutes and then just turns the page blank!?
.htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.thedomain.co.uk$ [NC]
cRewriteRule ^(.*)$ http://www.thedomain.co.uk/$1 [L,R=301]
Any ideas?
Firstly, make sure to remove leading “c” in the last line.
Secondly, you should probably escape dots as shown below.