This is a hack I'm using on my sites to convert XOOPS urls into shorter
urls which can be indexed by Search Engines.
I've found other hacks that do the same but I didn't like the way the worked
because I haven't had good results with urls within deep directorys like:
http://www.domain.com/modules/news/article/1/arg1/arg2In my experience, some Search Engines (Google for example) didn't like
to crawl pages so "deep" within the site.
This hack uses simpler and shorter urls, for example, instead of
http://www.domain.com/modules/news/article.php?storyid=1279or
http://www.domain.com/modules/news/article/storyid/1279you could have:
http://www.domain.com/article1279.htmlRight now it shortens urls for the following modules:
News
Userinfo
Submit
Archive
Sections
Xoopspartners
I think those are the more important parts from a XOOPS powered site.
It has been tested on my sites which are being powered by XOOPS 2.06, it
*should* work with other versions too.
You can download it from:
http://www.wtmmail.com/XoopsShortUrls/ShortURLs_0.1_for_Xoops.zipHow to install it?
------------------
Installation is simple:
1) Upload this two files to your XOOPS root dir:
- loadpage.php
- xoops_shorturls.php
2) Modify your .htaccess file, the one you have in your XOOPS root dir (if any)
and add the contents of the included .htaccess file. If you don't have one, just upload the one I provided.
3) In the XOOPS root dir, there is a file named mainfile.php
Open it and add the following line just after the disclaimer (line 27 for
Xoops 2.06):
include "xoops_shorturls.php";
Save mainfile.php and upload it to your server.
IMPORTANT! IMPORTANT! IMPORTANT! IMPORTANT! IMPORTANT!
You have to edit the mainfile.php that is in your server, not the one that
originally comes with you Xoops, as this file is changed after installation.
After this, open your site. You should have ShorUrls for some of the modules.
I'll be adding support for other modules as I see fit. Please report any errors
or difficulties you may have to this post.