ElieK Posted November 20, 2009 Share Posted November 20, 2009 Hey, i look after that but couldn't find it...I have a global domain in .com, and a local domain .fr which i would like to redirect straight to my prestashop French version . In the setting of my hoster "OVH" I try to put " /www/lang-fr"But of course lang-fr it's not a real directory for the hoster so it didn't work.Anyone have any suggestion to do that? Link to comment Share on other sites More sharing options...
alais Posted November 20, 2009 Share Posted November 20, 2009 http://jameseo.com/re-directing-user-based-on-their-geo-graphical-location/can be done with a PHP modification. You should check out the rest of the site too- great blog. Link to comment Share on other sites More sharing options...
tomerg3 Posted November 21, 2009 Share Posted November 21, 2009 I don't think the problem is geo related.You can try this rewrite in the .htaccess file RewriteCond %{HTTP_HOST} ^yourdomain.fr RewriteRule ^(.*)$ http://www.yourdomain.com/lang-fr/$1 [R=permanent,L] RewriteCond %{HTTP_HOST} ^www.yourdomain.fr$ [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/lang-fr/$1 [R=301,L] You also need to redirect your .fr domain to the same directory as your .com domain.Or you can create a new directory for the .fr site and place this code in a new .htaccess file there (don't forget adding "RewriteEngine on") Link to comment Share on other sites More sharing options...
ElieK Posted November 23, 2009 Author Share Posted November 23, 2009 I don't think the problem is geo related.You can try this rewrite in the .htaccess file RewriteCond %{HTTP_HOST} ^yourdomain.fr RewriteRule ^(.*)$ http://www.yourdomain.com/lang-fr/$1 [R=permanent,L] RewriteCond %{HTTP_HOST} ^www.yourdomain.fr$ [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/lang-fr/$1 [R=301,L] You also need to redirect your .fr domain to the same directory as your .com domain.Or you can create a new directory for the .fr site and place this code in a new .htaccess file there (don't forget adding "RewriteEngine on") Ok thanks you very much buddy!Just to know, what it's the difference between [R=permanent,L] and [R=301,L] ?thanks again Link to comment Share on other sites More sharing options...
tomerg3 Posted November 23, 2009 Share Posted November 23, 2009 You're welcome...I believe they are the same. Link to comment Share on other sites More sharing options...
Recommended Posts