Fix joomla modern url routing make 404 for old articles

2
Fix joomla modern url routing make 404 for old articles
4.3 (86.67%) 3 votes

Since Joomla 3.8 Joomla offer new URL routing which help you remove all id from URL. Before, if your article don’t assign to a menu, it will have id in the url. For example, if you have a news blog at https://bienthuy.net/blog/ then all article in that blog will have url like this: https://bienthuy.net/blog/x-article-alias.html
x: is article ID – it’s a number. But when you turn on Modren Url routing in Joomla 3.8, there will be no more id like that and new URL should be: https://bienthuy.net/blog/article-alias.html

Fix joomla modern url routing

Fix joomla modern url routing

So, all your old url will be 404 links because https://bienthuy.net/blog/x-article-alias.html and https://bienthuy.net/blog/article-alias.html is different
If you have a small blog and less number of article, you can do manual redirect for those urls.
For examples in Apache (Modrewrite )

For Nginx redirect:

But, if you have alot of articles? You can not do it manual, so here is solutions:
By using this htacess modrewrite code, you can remove all ID from URLs

For Nginx redirect:

 

Last update: 11:45:03 AM, 17th December 2017
Share.

About Author

2 Comments

Leave A Reply