Search code examples
mod-rewritejoomlasef

How to get rid of date in Joomla URL?


This has probably been answered before, but I am trying to figure out how to get rid of the date in a Joomla url, e.g. http://leisure.local/2015-10-02-02-00-39/contact-us. I have an alias for the menu item in this case of contact-us, and SEF enabled and module rewriting enabled. I also loaded up a SEF plugin. I don't know if it is my cache or something else. Kind of annoying.


Solution

  • This is a common problem. I found a tutorial that explains it quite well, probably better than I can. I've found to make it a habit with every menu change, to rebuild that one too.

    Here's the how to:

    Due to an incorrect alias or a non-English character in your category names, Joomla may replace the category name with a time stamp like 2014-10-06-17-53-05.

    We created a new menu item with the "Test" title (External URL menu type) and added a submenu for it with the "New" title (Single Article menu item). On the screenshot below you can see that the submenu URL contains a time stamp:

    joomla_remove_time_and_date_from_the_URL1

    To remove time and date from the URL, you should perform the following steps:

    Log in your Joomla admin panel and navigate to Menus -> Main Menu:

    enter image description here

    Select a required main menu item from the list and open it. In our case it is "Test" menu that adds the time stamp to the "New" submenu URL.

    Near the Menu Item Type option click Select button. In the pop-up window click System Links menu and select Text Separator type from the drop-down list:

    enter image description here

    Then, near the Menu Title field you will see Alias field. Here you can replace the time and date with your alias:

    enter image description here

    Change menu item type back to External URL and in the top left menu click Save button to save the changes.

    Now open the Home page on your site and then open the page you performed the changes for. You can see the time stamp was replaced with your alias.

    This is the end of the tutorial. Now you know how to remove time and date from the URL in Joomla 3.x.