Redirect K2 article url after alias change

4 days ago

I need to change the alias of a K2 article from id-alias1 to id-alias2.

The issue is that search engines have already indexed the url with id-alias1 so I need to use a 301 redirect from id-alias1to id-alias2 to avoid both urls to be indexed and considered as duplicate content.

I tried using the native joomla redirect component but it has no effect on these urls.

Is there a way to make 301 redirect between these 2 urls with the redirect component or other?

The Redirect Manager only works if the URL of the first article returns a 404 error. If it doesn't, then the redirect will not take place.

I suggest you do this redirect in the .htaccess file by adding the following (after RewriteManager On):

REDIRECT 301 /sub-1/id-alias1 http://www.yourwebsite.com/sub-1/id-alias2

If the first URL is http://www.yourwebsite.com/sub-1/id-alias1 and the second URL is http://www.yourwebsite.com/sub-1/id-alias2

Redirects in the .htaccess file are the most efficient and you don't

  • The Redirect Manager only works if the URL of the first article returns a 404 error. If it doesn't, then the redirect will not take place.

    I suggest you do this redirect in the .htaccess file by adding the following (after RewriteManager On):

    REDIRECT 301 /sub-1/id-alias1 http://www.yourwebsite.com/sub-1/id-alias2

    If the first URL is http://www.yourwebsite.com/sub-1/id-alias1 and the second URL is http://www.yourwebsite.com/sub-1/id-alias2

    Redirects in the .htaccess file are the most efficient and you don't have to install any extension for them to work.

    4 days ago
  • Similar problem here, I have a lot of URLs like this:

    www.mywebsite.com/blog/item/1021-le-foreste.html

    that becomes, after SEF changes, like this:

    www.mywebsite.com/blog/le-foreste.html

    How can I write an .htaccess rule that say something like: where you find an URL with "item" word and ID number redirect to the same URL without "item" word and ID number, please?

    Thanks a lot.

    4 days ago