View Single Post
  #14  
Old 07-27-2016, 04:35 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: 301 Redirect not working in HTACCESS file

Quote:
Originally Posted by mgwashburn
I actually went to the page and noticed that by default after clicking on the link after finding it during an on page search I got this:

https://www.naturalbathbody.com/apollon-shaving-gel.html?category_id=24

I then added the '?category_id=24' to the 301 redirect statement and then it worked.

I guess the product is added to a number of categories at the same time, that's why XC5 adds an extra param to track which category you came from to the page.

It should work without the category_id param as well (moreover, the "canonical" meta tag has no the parameter).

But what Steve says is a different thing. He advises you not to add product_id to the tail of your clean URL, but replace "appolon-shaving-gel.html" with the non-cleanURL version (?target=product&product_id=...).
This makes sense as after all rewrites the script works with this version of the URL anyway.

Quote:
Originally Posted by kevinrm
If you want to simplify your life, there is a pretty good redirect module for XC5. I've been using it, I like it.


I guess you mean this third-party module:
http://market.x-cart.com/addons/xcart-redirects-by-Nova-Horizons.html
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote