How to do a permanant redirect to another url in Joomla without using htaccess?

I am developing a custom extension and would like to redirect old/redundant urls to another one for better SEO. I can use htaccess for common things but in my case they are too many urls to set in htaccess.
Written by Category: Components 8 years ago

Like it on Facebook, Tweet it or share this question on other bookmarking websites.

You can use the following code to redirect permanently.

JFactory::getApplication()->redirect(JRoute::_($uri), '', 'message', true);

Replace $uri with the uri you would like to redirect to. For example,


Please register/login to answer this question.  Click here to login