maio Posted April 1, 2013 Share Posted April 1, 2013 In this post you'll find the magic code to add to the .htaccess in order to redirect a language extension page (.ie : www.yourshop/shop/en/* to --> www.yourshop/shop/*) the classic scenario is that you open a shop with multilanguage , you fill it up with cool content, and start to going up on google-rank ... since most of the shops start out local you'll probably have contents in just one language, in order to avoid duplicate content you'll turn to single language; at this point your (friendly)url will drop down the language extension (www.yourshop/shop/en/*) so all your indexed pages won't correspond to the actual url and the google-genius will get suspicious_ (those who have gone through this know it's a nightmare for somebody that's working on SEO) the best solution is to insert a redirect rule in the htaccess code that is generated in the home dir, this is it: RewriteRule ^en/(.*)$ /shop/$1 [R=302,L] (in a scenario like the one above www.yourshop/shop/en/* to --> www.yourshop/shop/*) _______________________ if your site is directly in the root go for: RewriteRule ^en/(.*)$ /$1 [R=302,L] you need to add the code after the ...... {ENV:REWRITEBASE} Hope this can help as much as it helped me: 9 Link to comment Share on other sites More sharing options...
TheCoffeeLocator Posted April 2, 2013 Share Posted April 2, 2013 (edited) I am not so sure it is that simple - have you REALLY implemented this, and in which version of Prestashop? certainly it is not so simple in 1.4* Also, 302 redirect is not best practice. Edited April 2, 2013 by TheCoffeeLocator (see edit history) Link to comment Share on other sites More sharing options...
maio Posted April 2, 2013 Author Share Posted April 2, 2013 It can work in any version, if you eventually regenerate the htaccess you have to add it again, (htaccess is regenerated if you turn on/off friendly urls) why do you say 302 is not good? it works either with 302 or 301 302 is temporary 301 is permanent Link to comment Share on other sites More sharing options...
TheCoffeeLocator Posted April 2, 2013 Share Posted April 2, 2013 301 is better for link juice, and reportedly preferred for search engines. There is more about the problems we had with htaccess redirect here - http://www.prestashop.com/forums/topic/203972-remove-en-from-url-when-multi-language-enstalled/page__st__20__p__1149703#entry1149703 Link to comment Share on other sites More sharing options...
Venky18 Posted April 14, 2013 Share Posted April 14, 2013 thanks maio Link to comment Share on other sites More sharing options...
gazapko Posted April 29, 2013 Share Posted April 29, 2013 It works, but when I change a language and I return to the default language I see the following warning: [Debug] This page has moved Please use the following URL instead: XX I can't return to the default language.. Link to comment Share on other sites More sharing options...
maio Posted May 20, 2013 Author Share Posted May 20, 2013 hi gazapko, did you solve ? what PS version are you using? Link to comment Share on other sites More sharing options...
ilan316 Posted May 29, 2013 Share Posted May 29, 2013 i cant get it to work i have 2 languages in my site , hebrew & english but even after i marked hebrew as my front office default language he still going to - myadmin.co.il/en/ instead of myadmin.co.il/he/ Link to comment Share on other sites More sharing options...
El Patron Posted May 29, 2013 Share Posted May 29, 2013 i cant get it to work i have 2 languages in my site , hebrew & english but even after i marked hebrew as my front office default language he still going to - myadmin.co.il/en/ instead of myadmin.co.il/he/ did you remember to clear your browser cache and cookies? ps will remember the language you last used until the cookies expire or your clear them Link to comment Share on other sites More sharing options...
ilan316 Posted May 29, 2013 Share Posted May 29, 2013 (edited) i think i had it fixed. 1 question, how do i forwarding site to go to "myadmin.co.il" and not to "myadmin.co.il/he/" Edited May 29, 2013 by ilan316 (see edit history) Link to comment Share on other sites More sharing options...
maio Posted June 3, 2013 Author Share Posted June 3, 2013 if you have 2 languages prestashop will add that extension in order for you to have more than 1 language , if you have no multilanguage than you'll have regular friendly_urls , (like the ones you ask for) Link to comment Share on other sites More sharing options...
ilan316 Posted June 3, 2013 Share Posted June 3, 2013 I have 2 languges , but im using only 1 Languge (Hebrew) in the Front Office - costumer cant choose Languge . And English Languge in the Back Office Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted July 1, 2013 Share Posted July 1, 2013 In this post you'll find the magic code to add to the .htaccess in order to redirect a language extension page (.ie : www.yourshop/shop/en/* to --> www.yourshop/shop/*) the classic scenario is that you open a shop with multilanguage , you fill it up with cool content, and start to going up on google-rank ... since most of the shops start out local you'll probably have contents in just one language, in order to avoid duplicate content you'll turn to single language; at this point your (friendly)url will drop down the language extension (www.yourshop/shop/en/*) so all your indexed pages won't correspond to the actual url and the google-genius will get suspicious_ (those who have gone through this know it's a nightmare for somebody that's working on SEO) the best solution is to insert a redirect rule in the htaccess code that is generated in the home dir, this is it: RewriteRule ^en/(.*)$ /shop/$1 [R=302,L] (in a scenario like the one above www.yourshop/shop/en/* to --> www.yourshop/shop/*) _______________________ if your site is directly in the root go for: RewriteRule ^en/(.*)$ /$1 [R=302,L] you need to add the code after the ...... {ENV:REWRITEBASE} Hope this can help as much as it helped me: Thanks Maio, This is worked For me... 1 Link to comment Share on other sites More sharing options...
maio Posted July 1, 2013 Author Share Posted July 1, 2013 happy to know Link to comment Share on other sites More sharing options...
ilan316 Posted July 1, 2013 Share Posted July 1, 2013 will it help in my case? Link to comment Share on other sites More sharing options...
maio Posted July 1, 2013 Author Share Posted July 1, 2013 @ilan316 1 question, how do i forwarding site to go to "myadmin.co.il" and not to "myadmin.co.il/he/" try this: RewriteRule ^he/(.*)$ /$1 [R=301,L] Link to comment Share on other sites More sharing options...
Bonjour Posted July 7, 2013 Share Posted July 7, 2013 (edited) I’m using multistore in combination with multi language, is it possible that this rewrite url doesn't work with multistore. RewriteRule ^en/(.*)$ /$1 [R=302,L] And why you don't use first an RewriteCond? Edited July 7, 2013 by bonjourwebshops (see edit history) Link to comment Share on other sites More sharing options...
maio Posted July 7, 2013 Author Share Posted July 7, 2013 why should you define a condition? rewrite rule works in .htaccess (it's about url redirection), it has nothing to do with the structure of your site; give me a practical example of what you need, Link to comment Share on other sites More sharing options...
Bonjour Posted July 9, 2013 Share Posted July 9, 2013 Hi Maio, About the RewriteCond was just an question, But when i use the rewrite url in htacces to hide the language code, i'm not able to login or create an account? Also i need to turn off the ‘’Automatically redirect to the canonical URL’’ because otherwise it gives an redirect error. Do you had also this error and issues? Link to comment Share on other sites More sharing options...
maio Posted July 9, 2013 Author Share Posted July 9, 2013 in my situation this solution is working fine, so far; maybe your site's settings are different... Link to comment Share on other sites More sharing options...
Michal_Ar Posted August 11, 2013 Share Posted August 11, 2013 Thank you Maio, it worked for me also and saved a lot of efforts. I had only a problem where to put the code, but finally line 23 was the solution. [21] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] [22] RewriteRule ^ro/(.*)$ /$1 [R=302,L] Link to comment Share on other sites More sharing options...
g1anty Posted November 21, 2013 Share Posted November 21, 2013 Hello, I had a similar problem because my site had the /en extension and I wanted to get rid of it. For some reason in the languages tab there were both USA english and GB english. (maybe because prestashop defaults to USA english from the initial install and I'm in the UK? Don't know). Sorry to sound like a noob but the way I approached it was that I went to language settings and (localization -> languages) and I ticked on the 2nd language and disabled it. Then when i visited my site WITHOUT the /en extension it worked fine. In regards to the redirect I don't think I'm going to worry about it too much as when people visit your site (store) they rarely, if never add the /en extention at the end. It is always with or without the "www". Just my experience from it. Don't know if it helps... I am very new to prestashop. Link to comment Share on other sites More sharing options...
luchiniii Posted November 21, 2013 Share Posted November 21, 2013 This didn.t work for me. I have 2 languages, English and Spanish, but what I need is to remove the "/en/" from links, just for english links. how can I do that?. Link to comment Share on other sites More sharing options...
maio Posted November 22, 2013 Author Share Posted November 22, 2013 (edited) hi luchiniii, RewriteRule ^en/(.*)$ /$1 [R=302,L] this doesn't work? is your shop in a different directory than root? you placed the redirect in the right place? Edited November 22, 2013 by maio (see edit history) Link to comment Share on other sites More sharing options...
Jebi Posted June 13, 2014 Share Posted June 13, 2014 Hi guys, so I tried to use the code in the .htaccess and it works fine. But if I set the media servers configuration, even I write again the code in the same place it doesn't work. My version 1.5.6.2. Did anybody find the same problem? Link to comment Share on other sites More sharing options...
mkkorleone Posted August 11, 2014 Share Posted August 11, 2014 Hello. Where exactly should be placed in Prestashop 1.6 <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> <IfModule mod_rewrite.c> <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule> # Disable Multiviews Options -Multiviews RewriteEngine on RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] </IfModule> AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/otf .otf AddType application/x-font-woff .woff <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" ExpiresByType image/vnd.microsoft.icon "access plus 1 year" ExpiresByType application/font-woff "access plus 1 year" ExpiresByType application/x-font-woff "access plus 1 year" ExpiresByType application/vnd.ms-fontobject "access plus 1 year" ExpiresByType font/opentype "access plus 1 year" ExpiresByType font/ttf "access plus 1 year" ExpiresByType font/otf "access plus 1 year" ExpiresByType application/x-font-ttf "access plus 1 year" ExpiresByType application/x-font-otf "access plus 1 year" </IfModule> Tnx. Link to comment Share on other sites More sharing options...
juvelin Posted December 24, 2014 Share Posted December 24, 2014 solution they stated doesnt work with prestashop version 1.6. I will put some effords when i have time to make it work. And i can post the solution here, if i can Hello. Where exactly should be placed in Prestashop 1.6 <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> <IfModule mod_rewrite.c> <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule> # Disable Multiviews Options -Multiviews RewriteEngine on RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] </IfModule> AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/otf .otf AddType application/x-font-woff .woff <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" ExpiresByType image/vnd.microsoft.icon "access plus 1 year" ExpiresByType application/font-woff "access plus 1 year" ExpiresByType application/x-font-woff "access plus 1 year" ExpiresByType application/vnd.ms-fontobject "access plus 1 year" ExpiresByType font/opentype "access plus 1 year" ExpiresByType font/ttf "access plus 1 year" ExpiresByType font/otf "access plus 1 year" ExpiresByType application/x-font-ttf "access plus 1 year" ExpiresByType application/x-font-otf "access plus 1 year" </IfModule> Tnx. Link to comment Share on other sites More sharing options...
web@unitedtimepieces Posted February 13, 2015 Share Posted February 13, 2015 I have been trying to redirect all /en/ to a site without /en/ too but have been unsuccessful. When I click the link on google with /en/, it gives a 404 error and does not re-direct. Prestashop 1.6.0.9 here, have anyone successfully done it using htaccess? Link to comment Share on other sites More sharing options...
Araviel Posted July 20, 2015 Share Posted July 20, 2015 Hi, i tried some but I got a blank page with google ERR_TOO MANY REDIRECTS in my server, prestashop is not in the root, he is in a /prestashop/ folder but redirected by domain. i want to remove the /fr/ in my domain : www.araclouds.com/fr/ to www.araclouds.com any help would be very appreciated thanks in advance 1 Link to comment Share on other sites More sharing options...
abombazza Posted November 5, 2015 Share Posted November 5, 2015 Hi at all. I have 2 language in my store. Italian (default) and english. i See that for each language is possible to have this url: shop.domain.com shop.domain.com/it shop.domain.com/it/ shop.domain.com shop.domain.com/en shop.domain.com/en/ What i would is to have only one url for each language. for italian: shop.domain.com/it/ for english: shop.domain.com/en/ Ho can i fix this by .htaccess ? Thank you at all for support. Link to comment Share on other sites More sharing options...
x3n0m0rph Posted November 28, 2016 Share Posted November 28, 2016 Thank you! Link to comment Share on other sites More sharing options...
mma87 Posted June 18, 2021 Share Posted June 18, 2021 first of all: backup! then: disable the languages don't used open .htaccess and add this code before "# Dispatcher" (if you have only en and it lang) RewriteRule ^en/(.*)$ /$1 [R=301,L] RewriteRule ^it/(.*)$ /$1 [R=301,L] save and upload the edited .htaccess TIP: regenerate the sitemap! Matteo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now