2

The Joomla menu system includes the menu's parent name in the URL structure for sub-menu items as follows:

https://www.mysite.com/parent/page

I'd like to remove the parent directory from the url as follows:

https://www.mysite.com/page

How can that be done?

  • If one of the provided answers has resolved your question, please award the green tick to the answer that you found most helpful/correct/appropriate for your situation. I see from your Stack Overflow acct, that you know how to do this. Please award the green tick to all of your resolved questions everywhere in the Stack Exchange Network. The system software doesn't recognise "right on the money" to mean that your question has been satisfied. Please also take the tour. – mickmackusa Aug 11 at 22:33
3

A "clean" way of addressing this problem from within the Joomla is to create the child menu item in a hidden menu, and then reference (in the real menu) the child menu item using a menu item of type "Menu Item Alias". I'm usually against all those URL rewriting plugins as they generally cause more harm than good, especially on high traffic sites.

  • I like this advice because keeping extensions to a minimum makes a site more sustainable in the long term (or it should, anyhow). Are you able to dumb this down and/or offer some screenshots to show new Joomla users how to do this in the backend? – mickmackusa Aug 11 at 22:40
1

Can’t be done with core, but there are numerous extensions that allow uri rewriting. The simplest one for your request is https://extensions.joomla.org/extension/direct-alias/

  • That is right on the money. I'm surprised that the Joomla team hasn't implemented the option in core if it's that easy. – steveorg May 16 '18 at 13:59

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.