Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
Author « Topic »  

Guy
ECT Moderator

Canada
2499 Posts

Posted - 11/15/2020 :  11:29:28  
Hi!

We need to change some categories names and I would like to know how I can add a redirect 301 to .htaccess

By exemple, I need to redirect this page :

https://www.lineaire.com/products/Tasses_en_c%C3%A9ramique_et_en_verre


to this one :

https://www.lineaire.com/products/Tasses_en_c%C3%A9ramique


I try adding this code, but it don't show any effect :

RewriteRule ^products/Tasses_en_céramique_et_en_verre$ /products.php?cat=63 [R=301,nc,L]

RewriteRule ^products/Tasses_en_c%C3%ramique_et_en_verre$ /products.php?cat=63 [R=301,nc,L]


Thanks!


----
Guy
Quebec, Canada
https://www.lineaire.com

Steved
Ecommerce Template Guru

United Kingdom
1022 Posts

Pre-sales questions only
(More Details...)

Posted - 11/15/2020 :  12:46:33  
Hi Guy,

Give the following a try:

RewriteRule ^products/Tasses_en_céramique_et_en_verre$ /products/Tasses_en_céramique? [L,R=301]


A couple of important things to bear in mind:

If using SEO friendly urls, make sure the code goes BEFORE the ECT url rewrite rules in htaccess.

If it still doesn’t work, it may be due to the use of accents in your urls.

Steve

midvalleydrifter001
Ecommerce Template Expert

USA
933 Posts

Posted - 11/15/2020 :  13:26:04  
Hi Guy,

If Steve's option doesn't work you can try it this way.

These things can get pretty tricky at times.

RewriteCond %{QUERY_STRING} ^$
RewriteRule ^products/Tasses_en_céramique_et_en_verre$ https://www.lineaire.com/products/Tasses_en_céramique? [R=301,L]

Patrick

Guy
ECT Moderator

Canada
2499 Posts

Posted - 11/15/2020 :  16:20:13  
Hello Guys,

I tried both suggestions, but it's not working.

I'm probably doing it wrong, there a lot of stuff in the .htaccess file.

----
Guy
Quebec, Canada
https://www.lineaire.com

Vince
Administrator

42766 Posts

Posted - 11/16/2020 :  11:07:28  
Hi Guy
I've added the rule for the "Tasses en Céramique" to the .htaccess file and it seems to be working. It should hopefully serve as an example for how and where to put these rules.

One thing I had to do was change the encoding of the file to UTF-8 and the file shouldn't be edited with an editor that doesn't understand UTF-8

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Guy
ECT Moderator

Canada
2499 Posts

Posted - 11/16/2020 :  11:45:23  
Thanks for that Vince.

What editor do you suggest? I use Dreamweaver when editing the .htaccess file.

----
Guy
Quebec, Canada
https://www.lineaire.com

Vince
Administrator

42766 Posts

Posted - 11/17/2020 :  02:24:20  
Hi Guy
I use an editor called Notepad++ where you can change the encoding of the file etc but I'm absolutely sure that the latest versions of DW will have this ability as UTF-8 is so widespread on the internet now.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Guy
ECT Moderator

Canada
2499 Posts

Posted - 11/17/2020 :  04:50:42  
Hello Vince,

Notepad++ is very nice. I will start using it as it look much better then Notepad.

Thanks!

----
Guy
Quebec, Canada
https://www.lineaire.com
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000