How to Set the URL of the OSMap HTML Sitemap with sh404SEF

Creating a custom URL in sh404SEF is the best way to load an HTML sitemap generated by OSMap with enabled sh404SEF.

Let's take a look at how to do this.


The problem

When you create an HTML sitemap with OSMap Pro in out of the box Joomla, there is no problem. The URL of your HTML sitemap by default will take a nice and user- and SEO-friendly format of [your-site-domain-name]/site-map.

The URL of my Joomla installation is localhost/osmappro2. So, here is the URL of my HTML sitemap:

nice url of html sitemap

The problem, albeit purely esthetically one, comes in when you decide to manage URLs of your Joomla site with the popular sh404SEF extension. 

You install sh404SEF. You turn it on. You then go ahead and browse the frontend of your Joomla site. You arrive to the page of your HTML sitemap. And you find something you most likely don't like.

The URL of the HTML sitemap looked neat and user-friendly a moment ago. But now it looks pretty ugly. sh404SEF transformed it into the format of [your-domain-name]/index.php/component/com_osmap/Itemid,294/id,1/view,html/:

ugly url created by sh404sef

Let's take a look at how to return it to a user-friendly format. 


Solution

The solution to this problem is to tell sh404SEF to use Joomla router explicitely for OSMap. 

Here is how to do this in more detail.

  • In your Joomla administrator panel, go to "Components" > sh404SEF:

16 go to components sh404sef

  • You will be taken to the "sh404SEF: Control panel" screen. In the top left corner, click "Configuration":

click configuration

Click the "By component" tab:

click by component

  • Scroll down until you see the "Osmap" label in the left column of components. Set it to "Use Joomla! router":

use joomla router

  • Click "Save & Close" in the top right corner:

click save and close

Test the result

  • Visit the frontend of your Joomla site. Click once again on the menu item of your OSMap HTML sitemap. You will see that now it has a fairly user-friendly URL:

01 nice url of html sitemap