HOME TIPS FORUMS DOWNLOADS
   »»  Tips Archive |
Tricks/Tools : Simplified URL
Posted by tl001 on 2005/1/19 11:31:54 (3729 reads)
Tricks/Tools

sim_suin has released SimplifiedURL, a newer and improved version of ShortURL based on Reynaldo's work.

Improvements:
1. removed "m-" in URLs
2. removed "." in "index+.html" now just a simple index.htm
3. Module admin URLs are spared so no more modifications of admin files are required in order to make it work.

Also you can just easily change the format from
xxx+yyy+zzz.htm
to
xxx-yyy-zzz.htm (personally I think it has a nicer look )

You can down load the Hack from
http://www.suin.jp/modules/mydownloads/visit.php?cid=3&lid=9

Enjoy.

Printer Friendly Page Send this Story to a Friend
The comments are owned by the poster. We aren't responsible for their content.
Poster Thread
tl001
Posted: 2005/1/19 11:38  Updated: 2005/1/19 11:38
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
Quote:
2. removed "." in "index+.html" now just a simple index.htm


It should read
removed "+" in index+.html
dionesku
Posted: 2005/1/24 19:32  Updated: 2005/1/24 19:32
Just popping in
Joined: 2005/1/24
From:
Posts: 1
 Re: Simplified URL
Great stuff
Thx.
tl001
Posted: 2005/1/31 11:24  Updated: 2005/1/31 12:08
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL - Change "+"s to "-"s
As requested, the followings are the steps of changing "+"s to "-"s

simplified_url.php
under
$out = array(
...
replace "+"s with "-"s

loadpage.php
locate (total 3 instances)
$file_arr = explode('+',$req_arr[0])
$file_arr = explode('+',$req_arr[1])

replace "+"s with "-"s

Good luck.
gehtdoch
Posted: 2005/2/5 6:51  Updated: 2005/2/5 6:51
Just popping in
Joined: 2005/2/5
From:
Posts: 2
 Re: Simplified URL
Hello,
first sorry for my english, i learned looong time ago, cause my first language is german.

I´ve build in Simplified URL and it works good. Only one problem i have.
In admin panel i select "blank homepage" and normaly there stand my selfmade (html)centerblock, but after install Simplified URL the site switch now to the news modul.

Can anybody explain it for me?

Kind regards
Joachim
tl001
Posted: 2005/2/5 9:03  Updated: 2005/2/5 13:58
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
Not sure what excactly caused the problem. Please make sure the startup module is set correctly in loadpage.php file

If you have news as the startup module, set to
$start_module = "news";

if you don't have a startup module (which may be your case), set to
$start_module = " ";
gehtdoch
Posted: 2005/2/5 9:13  Updated: 2005/2/5 9:13
Just popping in
Joined: 2005/2/5
From:
Posts: 2
 Re: Simplified URL
You´re right - that was the problem. I didn´t saw this option.

Now it works fine - thank you very much.

Joachim
tjnemez
Posted: 2005/3/17 12:43  Updated: 2005/3/17 12:43
Just popping in
Joined: 2004/6/12
From:
Posts: 3
 Re: Simplified URL
hey tl,

this hack does not work with the "Xooperstore" module category menu. any idea how i may edit module so it works.
tl001
Posted: 2005/3/17 13:04  Updated: 2005/3/17 13:05
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
index.php?=cat&cat_id=100000

The only thing seems to be problematic is ?=cat That may prevent the Hack from transforming the URL.

Usually you would have something like
index.php?item=cat&cat_id=999999

I don't know the use of "=cat", you may want to take a look at the index.php file to confirm its usage.

If it is not particularly useful (for your information, I can go directly to index.php?cat_id=100000 without any problems), you may want to remove the string from the url and see if that helps.

Good luck.
tjnemez
Posted: 2005/3/17 13:37  Updated: 2005/3/17 13:37
Just popping in
Joined: 2004/6/12
From:
Posts: 3
 Re: Simplified URL
thanks for checking this out tl, i tried to hack index but it did not work. so, i just disabled the simplified hack for this module.

cheers,
terry
krooga
Posted: 2005/4/10 19:51  Updated: 2005/4/10 19:51
Just popping in
Joined: 2005/4/10
From:
Posts: 1
 Re: Simplified URL
Hi guys,
Thanks for this hack, I am having a few difficulties installing it and I would appreciate any help...

BasicallY I followed all the instructions, my links appear correctly in the status bar (SEO) however when I click on them I get a 404. Same applies when I go to the root url (www.kragoo.com), kindly let me know how I can fix this...
tl001
Posted: 2005/4/10 21:31  Updated: 2005/4/10 22:16
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
If you had followed the instructions and made the appropriate changes to loadpage.php file (location of your loadpage.php file and startup module) and other files, the hack should work.

404 usually means that .htaccess can't locate loadpage.php file.

Maybe two places your should take a look:
1) Did you have the loadpage.php file uploaded?
2) Is the file readable by the server?

"chmod 604 loadpage.php", if you do have the file uploaded.

I checked your site, I could not call loadpage.php directly. The file is either not there (or being pointed to a wrong place) or not readable by server.
tl001
Posted: 2005/5/22 20:26  Updated: 2005/5/22 20:29
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
Quote:
Also you can just easily change the format from
xxx+yyy+zzz.htm
to
xxx-yyy-zzz.htm (personally I think it has a nicer look )


You will not be able to use xxx-yyy-zzz.htm if your query string contains date such as date=yyyy-mm-dd (piCal, is one of the modules). If you were to use xxx-yyy-zzz.htm format, the loadpage.php would translate back the simplified URL into something like
date=yyyy&mm=dd. The end result is that the hack will not work.

You would have to use default format - xxx+yyy+zzz.htm.
CearEff
Posted: 2005/5/30 23:10  Updated: 2005/5/30 23:10
Just popping in
Joined: 2005/5/30
From:
Posts: 2
 Re: Simplified URL
Hi,

Using simplified_url.php version 1.4, I seem to have this same problem. As soon as I upload the provided .htaccess file, my site no longer loads unless I go directly to the /modules/news etc.

Once I goto www.mysite.com/modules/news then I can rollover my links and see the 'Simplified' links in the status bar but get 404 when accessing them.

I have tested with .htaccess containing only:

RewriteEngine on
RewriteRule test.html / [L]

And this works fine, the redirect from www.mysite.com/test.html to www.mysite.com/modules/news works with no problem.

-I have my news modules set as the start module
-loadpage.php is also set to "news"
-I have chmod'ed loadpage, simplified_url and htaccess to 644 and/or 777 for testing

Any ideas?

Thanks
tl001
Posted: 2005/5/31 11:07  Updated: 2005/5/31 11:07
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
Simplified URLs requires correct settings in mainfile.php and loadpage.php

I would check if the loadpage.php had been set correctly.
$script_path = "http://localhost/loadpage.php";

It should be yoursite/loadpage.php


Error 404 seems that loadpage.php is set incorrectly - web server can't find it.
CearEff
Posted: 2005/6/2 16:34  Updated: 2005/6/2 16:34
Just popping in
Joined: 2005/5/30
From:
Posts: 2
 Re: Simplified URL
Quote:
It should be yoursite/loadpage.php


Yes I had made this change as well but still no change.

Any other ideas?

Thanks for the help,
Cear
tl001
Posted: 2005/6/2 19:52  Updated: 2005/6/2 19:52
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
If you have set loadpage.php and other settings correctly, I really don't know what is wrong.

You may want to post your URL (pm me if you don't want others to see) here so I could take a look at it. No promise of fixing anything since your problem is really puzzling.
zigzag
Posted: 2005/7/31 8:59  Updated: 2005/7/31 8:59
Just popping in
Joined: 2005/7/31
From:
Posts: 2
 Re: Simplified URL
Hi,

I'm having problems with rss outputs (rssfit module & weblog module) since installing this. I've excluded both modules in simplified_url.php and they are working ok except for the rss feeds. When you click on the rss or xml links instead of looking like the normal feed it comes up like this:

http://www.mysite.co.uk/xoops2/modules/smartsection Just Use it! Copyright © 2001-2003 me@me.com (XOOPS Site) me@me.com (XOOPS Site) living in france XOOPS 2.0.9.2 / RSSFit 1.1 http://blogs.law.harvard.edu/tech/rss en Sun, 31 Jul 2005 13:57:12 +0100 Why do stars suddenly appear Sat, 30 Jul 2005 23:40:00 +0100 http://www.mysite.co.uk/xoops2/modules/smartsection
/item.php?itemid=9 sections http://www.mysite.co.uk/xoops2/modules/smartsection
/item.php?itemid=9 Fri, 29 Jul 2005 20:20:00 +0100 http://www.mysite.co.uk/xoops2/modules/smartsection
/item.php?itemid=8 sections http://www.mysite.co.uk/xoops2/modules/smartsection/item.php?itemid=8
tl001
Posted: 2005/7/31 9:19  Updated: 2005/7/31 9:28
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
The RSS feed on this site is working fine.

I have never used RSSfit and sorry I don't know what the problem is. Also smartsection may have problems with SimplifiedURLs.

You may want to give RSS extension by Happy Linux a try.
http://linux2.ohwada.net/modules/mydownloads/singlefile.php?lid=6

It is not difficult to make your own plugins.
gguddu
Posted: 2005/10/8 20:02  Updated: 2005/10/8 20:02
Just popping in
Joined: 2005/7/1
From:
Posts: 3
 Re: Simplified URL
hi, The link http://www.suin.jp/modules/mydownloads/visit.php?cid=3&lid=9 does not work. It's downloading the 'search' module. Can anyone know how to get this module? I tried shortURLs, but did not like it due to '+' and lots of redirected pages!

Thanks, guddu
gguddu
Posted: 2005/10/8 20:19  Updated: 2005/10/8 20:19
Just popping in
Joined: 2005/7/1
From:
Posts: 3
 Re: Simplified URL
Sorry. I should have searched your site before posting. I could able to download the module from this site.

But even this module uses '+' and not '-'
tl001
Posted: 2005/10/9 8:36  Updated: 2005/10/9 8:36
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
Quote:
But even this module uses '+' and not '-'


The instruction has been posted here, you just have to read all messages carefully!

Also I mentioned that if you are using piCal or any module with something like "&date=yyyy-mm-dd", you have to use "+". "-" will not work as loadpage.php will do funny things to your URL.
kapsat
Posted: 2005/10/21 0:41  Updated: 2005/10/21 0:41
Just popping in
Joined: 2005/9/29
From: New Orleans
Posts: 8
 Re: Simplified URL
On the load PHP file

The third ref is this:
Quote:
$para_arr = explode('-',$req_arr[1]);


Correct???

It seems to be working.

Also it seems this has to be done
Quote:
changing the "+" to "-"


If you leave the pluses in place, your server headers return a response code of 400 (bad syntex) even though everything seems fine. After i changed the pluses to minuses my header returned a response code of 200.

dave
macmend
Posted: 2006/2/2 18:00  Updated: 2006/2/2 18:00
Just popping in
Joined: 2005/8/21
From:
Posts: 17
 Re: Simplified URL
I have trouble with this module and newbb2 or CBB1.16, in that it cannot change the way the forum looks as it cannot redirect. All redirections seem to end up in the root folder rather than the CBB module folder?
tl001
Posted: 2006/2/2 20:49  Updated: 2006/2/2 20:49
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
Both ShortURLs and SimplifiedURLs have problems with javascripts which Newbb2 or CBB uses extensively.

The reason is that both hacks rely on an absolute path to generate the corresponding transformed URLs. Because javascripts use relative paths, so you will end up with transformed URLs directed towards the root directory not the newbb2 or CBB module directory as expected.

There are no solutions for the problems. Only solution is to exclude the module.
beetraham
Posted: 2006/7/27 21:18  Updated: 2006/7/27 21:18
Just popping in
Joined: 2006/7/27
From:
Posts: 1
 Re: Simplified URL
Please note that having reset the administrative option ("General-> Preferences ->"Use gzip compression?") to NO made it work again with flying colours.

This gentle notice may not be applicable for you at your server env at most cases, but it sure did the beauty tricks for me.

Just my 1.99 cents,

-beetraham
plusangel
Posted: 2006/10/26 3:18  Updated: 2006/10/26 3:23
Just popping in
Joined: 2006/10/26
From: Peireas, Greece
Posts: 3
 Re: Simplified URL
Dear friends,

I'd like to try this hack fro my site.
I've read the installation guide and at a certain point it refers to a couple of lines that have to be added in my .htaccess.

I can't find the htaccess sample inside the zipped package.
Is something changed and it's not required any more?


Sorry just forgot that my ubuntu consider the dot-beginning files as system and hides them.Oups!

Sorry
northern
Posted: 2007/3/7 3:31  Updated: 2007/3/7 3:31
Just popping in
Joined: 2007/3/7
From:
Posts: 2
 Re: Simplified URL
Is there still support for this?
even thow its now version 1.5 ...

IM having almost the same problem CearEff was having, But i cant see the pages content.
It loads the page, just cant see it.
turn the SEO off and its veiwable.

any ideas?
tl001
Posted: 2007/3/7 7:18  Updated: 2007/3/7 7:20
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
Quote:

IM having almost the same problem CearEff was having, But i cant see the pages content.
It loads the page, just cant see it.
turn the SEO off and its veiwable.

any ideas?

Northern, you can see SimplifiedURLs works just fine on this site. Without any further information, I don't know what your problem is.

I had asked CearEff for further info, and I have never heard back from him/her again.

If you have followed the instruction, (double-check it to make sure), you generally should not have any problem. If the URLs have been transformed successfully, you just couldn't get the page displayed. Then it has to do the loadpage.php not being found - it could be a location problem (check instruction again) or a file permission problem.

Try to turn the PHP debug ON and see if you get any error message.
northern
Posted: 2007/3/8 0:31  Updated: 2007/3/8 0:31
Just popping in
Joined: 2007/3/7
From:
Posts: 2
 Re: Simplified URL
Just so we are on the right pages.

this is how the loadpages.php should look right?
//  ------------------------------------------------------------------------ //
//          General Settings 				                  	     //
//  ------------------------------------------------------------------------ //
//  What is your default module? just enter the Dir name, for example,       //
//  "news" or "newbb" etc. If you don't set default module, please set it    //
//   blank like: $su_defaultmodule = "";                                     //

    $start_module = "";

//  The URL of this file"loadpage.php".						     //

    $script_path = "http://mysite.com/loadpage.php";

//  cf.    $script_path = "http://mysite.com/loadpage.php";		     //
//	                                           				     //
//  Use debug? (yes:1 no:0 default:0)					 	     //

    $su_debug_setting = 0;

//  ------------------------------------------------------------------------ //
//  Don Not Change Follows                                                   //
//  ------------------------------------------------------------------------ 
tl001
Posted: 2007/3/8 6:46  Updated: 2007/3/8 6:49
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
 $script_path = "http://mysite.com/loadpage.php";

If you have defined this correctly, then you will have to look at your server settings and Xoops version. They might be the issues.

FYI: the path for xoops-tips.com is:
$script_path = "http://xoops-tips.com/loadpage.php";
tl001
Posted: 2007/3/13 22:24  Updated: 2007/3/13 22:44
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
Still no clues on their problems. If anyone has a similar problem, please do the following:

1) If URLs have been transformed but contents could not be displayed - check your instruction and make sure that you have followed it step by step.

2) Check with your hosts on their policy of rewrite usage in htaccess. Some hosts are restricting the use.

3) And finally if you still have the problem. Please do a search in Xoops.org forums to see if Xoops version may have something to do with it.

Other than these suggestions, there are not much we can help about the problem.
RoMeO
Posted: 2007/4/5 15:45  Updated: 2007/4/5 15:45
Just popping in
Joined: 2006/2/9
From:
Posts: 5
 Re: Simplified URL
thanks for suggestion.
tl001
Posted: 2007/4/6 13:32  Updated: 2007/4/6 13:38
Webmaster
Joined: 2004/6/10
From:
Posts: 282
 Re: Simplified URL
Quote:
thanks for suggestion.


RoMeO, hope it helps

I am a bit disappointed with no feedback on the issue. Like many others, I am very curious as to what exactly caused or is causing the problem. A feedback would be great, it would be of benefit to others and they would know what to look for or do.