.htaccess problem adding www to the url and removing index.php
Posted
by
ricky
on Stack Overflow
See other posts from Stack Overflow
or by ricky
Published on 2011-05-09T17:11:08Z
Indexed on
2012/06/29
3:16 UTC
Read the original article
Hit count: 385
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>
© Stack Overflow or respective owner