Posted on: 2004/2/14 0:38
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/arg2
In 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 ofhttp://www.domain.com/modules/news/article.php?storyid=1279
you could have:http://www.domain.com/article1279.html
Right now it shortens urls for the following modules:
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.zip
How to install it?
Installation is simple:
1) Upload this two files to your XOOPS root dir:
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
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.