Contact Details
Sunday, 24 April 2011 16:59

How to fix the homepage URL in XMap sitemap

XMap is an excellent plugin for Joomla which dynamically generates both an HTML and an XML sitemap for your website. However, it has a problem where the homepage URL is not generated in a Search Engine Friendly way. Most people do not want their homepage URL to contain anything but the basic site URL (www.yoursite.co.uk), but XMap will always append the alias of the homepage menu item, for example www.yoursite.co.uk/home.html.

To fix this, open you will need to change the following two files in the XMap installation:

components/com_xmap/xmap.html.php
components/com_xmap/xmap.xml.php

Find the following line in both files:

$link = Xmap::getItemLink($node);

and add the following line immediately after:

$link = str_replace('/home.html', '/', $link);

You may need to clear the XMap cache via components->xmap->options in order to see the changes applied.

1 Comment

  • Comment Link alex111 Wednesday, 06 July 2011 16:30 posted by alex111

    thanks. worked for me!

    i'm using xmap 1.2.11

Leave a comment

Make sure you enter the (*) required information where indicated.
Basic HTML code is allowed.

All our websites include

  • Content Management System
  • Search Engine Optimized site
  • FREE .co.uk domain name
  • 1 Years Hosting FREE
  • FREE simple logo design
  • FREE stock images
  • Unlimited design revisions
  • Video integration
  • Contact/enquiry forms
  • Phone support
  • "Find us" using Google Maps
  • Paypal "Buy Now" buttons