Problem with sitemap's own URL on sitemap page (builtin SEF)
1 post
• Page 1 of 1
Problem with sitemap's own URL on sitemap page (builtin SEF)
Hi folks,
using Joomla 1.5 with built-in SEF URLs, with .htaccess file as standard.
I have put a link to the XMap on a main menu, with alias of "sitemap".
The sitemap comes up properly. However, on the on the sitemap page, the URL for "sitemap" comes up as /sitemap?sitemap=1
This is because there's no router.php file for XMap. In router.php it should detect that there's a "sitemap=..." query component on the internal URL, and should then remove it if it's not necessary.
A minimal router.php which did this for me was this:
Admittedly this probably wouldn't work when you have more than 1 sitemap - you need to encode the sitemap # into the URL, then retrieve it from the incoming URL and put it back into $sitemap again. But for most people the above code should work just fine.
Cheers,
Stephen
using Joomla 1.5 with built-in SEF URLs, with .htaccess file as standard.
I have put a link to the XMap on a main menu, with alias of "sitemap".
The sitemap comes up properly. However, on the on the sitemap page, the URL for "sitemap" comes up as /sitemap?sitemap=1
This is because there's no router.php file for XMap. In router.php it should detect that there's a "sitemap=..." query component on the internal URL, and should then remove it if it's not necessary.
A minimal router.php which did this for me was this:
- Code: Select all
<?php
function XMapBuildRoute(&$query) {
unset($query['sitemap']);
}
function XMapParseRoute($segments)
{
}
Admittedly this probably wouldn't work when you have more than 1 sitemap - you need to encode the sitemap # into the URL, then retrieve it from the incoming URL and put it back into $sitemap again. But for most people the above code should work just fine.
Cheers,
Stephen
- metamod_guy
- Fresh Boarder

- Posts: 3
- Joined: Tue Apr 28, 2009 3:12 am
1 post
• Page 1 of 1
Who is online
Users browsing this forum: Bing [Bot] and 2 guests