Hi, so i want redirect non www to www. But something is going wrong. When i write my url without www. it´s redirect to: mydomain/index.php/http:/mydomain .htaccees file looking like this: AddType application/x-httpd-php53 php53 php <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ public/ [L] RewriteRule (.*) public/$1 [L] </IfModule> Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^mydomain [nc] rewriterule ^(.*)$ http://xxx.mydomain /$1 [r=301,nc] What i did wrong?
hello use this RewriteEngine on RewriteCond %{HTTP_HOST} !^www.site.com$ RewriteRule ^(.*)$ http://www.site.com/$1 [R=301] off course replace site.com for your domain Best
Or this: RewriteCond %{HTTP_HOST} ^site.com [NC] RewriteRule ^(.*)$ http://www.site.com/$1 [R=301,L] Code (markup):