VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: lindapowers on March 16, 2016, 12:29:43 PM

Title: vm 3.0.14 we need to redirect pages after removing categories and suffix?
Post by: lindapowers on March 16, 2016, 12:29:43 PM
Hi

vm 3.0.14 joomla 3.4.8

I have used the new function to remove categories and the suffix -detail from the URL (very nice addon btw).

However I noticed the old urls are still working if loaded and are not being redirected, so my question is if that is considered a redirect?


old URL: http://www.comenaranjas.com/es/tienda/naranjas/naranjas-de-zumo-kg-detail.html

new URL: http://www.comenaranjas.com/es/tienda/naranjas-de-zumo-kg.html


As you can see the old one loads and is not redirected no?

Even if I do a 301 redirect from joomla component it stays in the old one.


Regards
Title: Re: vm 3.0.14 we need to redirect pages after removing categories and suffix?
Post by: Ghost on March 16, 2016, 12:39:25 PM
It shouldn't be necessary because canonical tag on both pages links to the new URL (without suffix):

<link href="http://www.comenaranjas.com/es/tienda/naranjas-de-zumo-kg.html" rel="canonical" />
Title: Re: vm 3.0.14 we need to redirect pages after removing categories and suffix?
Post by: PRO on March 16, 2016, 12:48:05 PM
Quote from: lindapowers on March 16, 2016, 12:29:43 PM


Even if I do a 301 redirect from joomla component it stays in the old one.


Joomla will only redirect if a 404 is given.
It does not 404

This needs to be done with htaccess

Be careful with htaccess, and make sure to test
Title: Re: vm 3.0.14 we need to redirect pages after removing categories and suffix?
Post by: lindapowers on March 16, 2016, 13:05:13 PM
Thanks guys, im sure this is useful for many others.