Simplified URLs Hack

Date 2005/1/18 7:15:28 | Topic: Hacks

This hack Simplified URLs ,which is based on ShotURLs released by reynaldo, converts Xoops URLs into shorter and static ones that can be indexed by search engines.


Quote reynaldo's words;
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:
In my experience, some Search Engines (Google for example) didn't like to crawl pages so "deep" within the site.

For this reason, this hack gives you shallow URLs. For example ;

[Default] http://xoops_site/modules/news/article.php?storyid=1
[Converted] http://xoops_site/news+article.storyid+1.htm

[Default] http://xoops_site/modules/userinfo.php?uid=1
[Converted] http://xoops_site/userinfo.uid+1.html

I checked this hack in Xoops2.0.9.X and 2.0.6.
This probably runs in the other versions.
I also checked more than 30 modules so I think it is available for most of the modules. Yet errors must exist in this hack. When you find some bugs or errors, please let me know.

Finally I'm sorry for my poor English and I appreciate reynaldo who developed ShortURLs.

You can download HERE >>> Simplified URLs 1.1

How to Install
1) Modify your loadpages.php.
Set your start module's dir name at line 33.
If you don't set a start module, please set it blank like: $start_module = "";
Set the position of "loadpages.php" at line 38.

2) Upload this two files to your Xoops root dir:
- loadpages.php
- simplified_url.php

3) 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.

4) In the Xoops root dir, there is a file named mainfile.php
Open it and add the following line just after the disclaimer (line 41 for
Xoops 2.09):
include "simplified_url.php";

It must be put under "XOOPS_URL"
ex :
41:include "simplified_url.php";

5) Save mainfile.php and upload it to your server.

Support Forum is HERE ... 5&forum=14&post_id=131943

This article comes from XOOPS Web Application System

The URL for this story is: