What's wrong with Joomla routing?

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Post Reply
User avatar
kiasati
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 164
Joined: Thu May 26, 2016 6:08 am
Contact:

What's wrong with Joomla routing?

Post by kiasati » Sat Jan 26, 2019 11:56 am

Hi.

assume an article's URL is like this:
example.com/cat1/cat2/12-article-title

this URL works too:
example.com/cat1/12-article-title

even if I use a junk URL like below, as long as the article id is provided, still I get the article:
example.com/srgswthsrth/12-article-title
or
example.com/srgswthsrth/12-



I know it's because of that the actual URL is something like this:
example.com/index.php?option=com_content$id=12



The question is, WHY Joomla doesn't get the other elements like categories and the article's alias, and then redirect the not complete URL to the complete URL when it receives a GET request containing only the id for example?
Learning never stops...

Alejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 219
Joined: Fri Aug 19, 2005 12:28 pm
Contact:

Re: What's wrong with Joomla routing?

Post by Alejo » Sun Jan 27, 2019 9:40 pm

Hello

Joomla routing has worked like this for a long time and the same issues you described can be easily replicated on Joomla.org articles. The introduction of modern routing does away with the numeric IDs from URLs to overcome this issue. You can find the setting to enable modern routing under Content / Articles / Options / Integration / URL routing.

It is disabled by default for backwards compatibility, but this will be the default router in Joomla 4.
https://www.jreviews.com/joomla directory, classifieds, and reviews system for Joomla and WordPress

User avatar
kiasati
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 164
Joined: Thu May 26, 2016 6:08 am
Contact:

Re: What's wrong with Joomla routing?

Post by kiasati » Mon Jan 28, 2019 7:42 am

Alejo wrote:
Sun Jan 27, 2019 9:40 pm
Hello

Joomla routing has worked like this for a long time and the same issues you described can be easily replicated on Joomla.org articles. The introduction of modern routing does away with the numeric IDs from URLs to overcome this issue. You can find the setting to enable modern routing under Content / Articles / Options / Integration / URL routing.

It is disabled by default for backwards compatibility, but this will be the default router in Joomla 4.
I'm aware of modern routing. but this is impossible for a website that is already up.
I have around 500 articles and they are all indexed. enabling modern routing will change 500 URLs and creates 500 "not found 404" errors.
Learning never stops...

Alejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 219
Joined: Fri Aug 19, 2005 12:28 pm
Contact:

Re: What's wrong with Joomla routing?

Post by Alejo » Mon Jan 28, 2019 11:21 am

I didn't understand that this was an existing site with hundreds of links. You can still use modern routing and create a redirect that catches the URLs with the IDs in them and does a 301 to the no-ID version. You can find an example of how to do this here https://bienthuy.net/fix-joomla-modern-url-routing/

You may need more than one rule if you have many categories, but with a bit of work you can get this done. It won't fix itself and this is a viable solution.
https://www.jreviews.com/joomla directory, classifieds, and reviews system for Joomla and WordPress


Post Reply

Return to “General Questions/New to Joomla! 3.x”