.htaccess problem adding www to the url and removing index.php
- by ricky
I'm not sure why my code doesn't work.
I want to add www to the url and when they enter http://domain.co.uk/index.php
it will become http://www.domain.co.uk/ only
here is my htaccess code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain.co.uk [NC]
RewriteRule ^(.*)$ http://www.domain.co.uk/$1 [L,R=301]
RewriteRule index\.php http://www.domain.co.uk/ [NC,R]
</IfModule>