![]() |
301 redirect problem 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//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 %{---_host} ^mydomain [nc] rewriterule ^(.*)$ ------.mydomain /$1 [r=301,nc] What i did wrong? |
Re: 301 redirect problem 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} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,NC] |
Re: 301 redirect problem Thanks! it's works :) |
Re: 301 redirect problem I also use this its work thanx for such a nice share. |
Re: 301 redirect problem here is good code to 301 redirect, write in .htaccess: Quote:
|
| All times are GMT -6. The time now is 11:36 AM. |