1

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?

2

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.

  • Thx, it works but I didn't understand the code RewriteManager On you mention. Shouldn't it be after RewriteEngine On? – web-tiki Jul 7 '16 at 8:25
  • 1
    Yes - ideally it should be after RewriteEngine On. – itoctopus Jul 7 '16 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.