zerryxu Posted September 24, 2013 Share Posted September 24, 2013 This is my domain: http://www.lovejewelrystore.com/ I hope if I type: www.lovejewelrystore.com/ or lovejewelrystore.com/ they will automatically direct to http://www.lovejewelrystore.com/ 301 permanently direct to http://www.lovejewelrystore.com/ how to achieve it? thank you Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 hello it works like that right now if you use www.lovejewelrystore.com as domain param under preferences > seo & urls tab it will work as you expected Link to comment Share on other sites More sharing options...
zerryxu Posted September 24, 2013 Author Share Posted September 24, 2013 preferences > seo & urls tab it is www.lovejewelrystore.com but I want it 301 direct to http://www.lovejewelrystore.com Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 in htaccess file create this code: RewriteCond %{HTTP_HOST} ^lovejewelrystore\.com [NC] RewriteRule ^(.*) http://www.lovejewelrystore.com/$1 [L,R=301] Link to comment Share on other sites More sharing options...
zerryxu Posted September 24, 2013 Author Share Posted September 24, 2013 in htaccess file create this code: RewriteCond %{HTTP_HOST} ^lovejewelrystore\.com [NC] RewriteRule ^(.*) http://www.lovejewelrystore.com/$1 [L,R=301] can I write the above code at the end of htaccess file? will www.lovejewelrystore.com and lovejewelrystore.com both direct to http://www.lovejewelrystore.com/ Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 www.lovejewelrystore.com is the same address as http://www.lovejewelrystore.com/ put code i mentioned right after ~~end~~ Link to comment Share on other sites More sharing options...
zerryxu Posted September 24, 2013 Author Share Posted September 24, 2013 it is 500 now Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 you removed this code? im asking because i checked your website and it works Link to comment Share on other sites More sharing options...
zerryxu Posted September 24, 2013 Author Share Posted September 24, 2013 yes, i removed, because it is 500 Link to comment Share on other sites More sharing options...
zerryxu Posted September 24, 2013 Author Share Posted September 24, 2013 # ~~end~~ RewriteCond %{HTTP_HOST} ^lovejewelrystore\.com [NC]RewriteRule ^(.*) http://www.lovejewelrystore.com/$1 [L,R=301]Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again it is just like above, then the front office is 500 Link to comment Share on other sites More sharing options...
El Patron Posted September 24, 2013 Share Posted September 24, 2013 it's always better to ensure the apache module you are accessing is loaded before executing.. see this: http://www.prestashop.com/forums/topic/2131[spam-filter]tip-15-and-custom-htaccess/ try this: <IfModule mod_rewrite.c> # URL rewriting module activation RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] </IfModule> 1 Link to comment Share on other sites More sharing options...
zerryxu Posted September 25, 2013 Author Share Posted September 25, 2013 can you tell exactly? Link to comment Share on other sites More sharing options...
vekia Posted September 25, 2013 Share Posted September 25, 2013 as far as i remember El Patron has got nice module for customize .htaccess file Link to comment Share on other sites More sharing options...
El Patron Posted September 25, 2013 Share Posted September 25, 2013 here is a little guide of how to update your .htaccess within the rules of ps regeneration http://www.prestashop.com/forums/topic/2131[spam-filter]tip-15-and-custom-htaccess/ I do have a little module that allows you to update .htaccess, see my signature and browse the shop for it. Link to comment Share on other sites More sharing options...
Recommended Posts