![]() ![]() |
|
Cleaner IPB URLs [ mod_rewrite ]
|
Aug 30 2004, 12:42 PM
Post
#1
|
|
![]() recursion n. see recursion ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,673 Joined: 11-April 03 From: 127.0.0.1 :) Member No.: 855 IPB Version: 1.3.x |
Cleaner IPB URLs [ mod_rewrite ]
Category: Multi View Compatibility: Invision Power Board Demo: http:// Description: This mod allows: /forumfolder/topic1 => Shows Topic #1 /forumfolder/topic_1 => Shows Topic #1 /forumfolder/forum1 => Shows Forum #1 /forumfolder/forum_1 => Shows Forum #1 /forumfolder/user1 => Shows User #1 /forumfolder/user_1 => Shows User #1 /forumfolder/login => Login Screen /forumfolder/logout => Logout Screen /forumfolder/help => Help Screen /forumfolder/members => Memberlist /forumfolder/search => Search /forumfolder/calendar => Board Calendar URLs such as topic1.php, forum1.html, members.php, user1.jsp, calendar.htm, etc will also work - the file extension is not required, but the rewrite will work even if included. The rewrite file will also force all requests to IPB system folders such as archive_in, archive_out, sources, Skin, lang etc. to recieve a 403 Forbidden notice. Using query strings: /forumfolder/topic1?st=15 will show page 2 from topic #1. /forumfolder/topic1?var1=str1 will rewrite to: index.php?showtopic=1&var1=str1 View Modification |
|
|
|
Aug 31 2004, 09:04 AM
Post
#2
|
|
|
Member ![]() ![]() Group: Members Posts: 169 Joined: 19-July 04 From: Perth, Australia Member No.: 116,989 |
Thanks! This is exactly what I've been looking for!
I'll try it now... edit: hmm doesn't work... don't you have to include this somewhere QUOTE ob_start(); and etc (not in .htaccess)?
function replace_for_mod_rewrite(&$s) { $urlin = array( "'(?<!/)index.php'", This post has been edited by GodzillaRatus: Aug 31 2004, 09:18 AM -------------------- |
|
|
|
Aug 31 2004, 09:12 AM
Post
#3
|
|
|
Newbie ![]() Group: Members Posts: 51 Joined: 28-April 03 Member No.: 7,268 IPB Version: Not Applicable |
Good,
can you make this for IPB2.0 please :-) Edit: Same, dosen't work to mine also This post has been edited by ngszeli: Aug 31 2004, 09:35 AM |
|
|
|
Aug 31 2004, 10:15 AM
Post
#4
|
|
![]() recursion n. see recursion ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,673 Joined: 11-April 03 From: 127.0.0.1 :) Member No.: 855 IPB Version: 1.3.x |
Hey,
You don't have to make any modifications to IPB source AFAIK. Can you explain problems your having with it (php parse errors?). Make sure you also have mod_rewrite on the server. Not sure whether this works with 2.0, depends on whether the URLs have changed. Cow -------------------- |
|
|
|
Sep 1 2004, 01:06 AM
Post
#5
|
|
|
Member ![]() ![]() Group: Members Posts: 169 Joined: 19-July 04 From: Perth, Australia Member No.: 116,989 |
Well, mod_rewrite works on my Nuke site, so it should work on the forums too. The thing is that nothing happens, that's the problem... :S
Have you got a demo link? This post has been edited by GodzillaRatus: Sep 1 2004, 01:06 AM -------------------- |
|
|
|
Sep 1 2004, 04:12 AM
Post
#6
|
|
![]() recursion n. see recursion ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,673 Joined: 11-April 03 From: 127.0.0.1 :) Member No.: 855 IPB Version: 1.3.x |
It's working fine on my localhost, and of the servers I have with mod_rewrite, I don't host IPB.
Can you tell me what happens when you visit forumfolder/topic1? (Change 1 to relevant topic ID if required) -------------------- |
|
|
|
Sep 1 2004, 06:41 AM
Post
#7
|
|
|
Member ![]() ![]() Group: Members Posts: 169 Joined: 19-July 04 From: Perth, Australia Member No.: 116,989 |
Ok, I take it back, it works, but to some extent I think. If you type it in the address bar, it goes to the link. I was thinking that it would re-write the links in the forum as well, because how else would Google get to the re-written links if the forum still links to the old-style link? (does all of that make sense)
This post has been edited by GodzillaRatus: Sep 1 2004, 07:21 PM -------------------- |
|
|
|
Sep 5 2004, 06:05 AM
Post
#8
|
|
|
Member ![]() ![]() Group: Members Posts: 169 Joined: 19-July 04 From: Perth, Australia Member No.: 116,989 |
bump
-------------------- |
|
|
|
Sep 5 2004, 06:16 AM
Post
#9
|
|
![]() recursion n. see recursion ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,673 Joined: 11-April 03 From: 127.0.0.1 :) Member No.: 855 IPB Version: 1.3.x |
Hey,
This mod doesn't go this far. I dunno, but it probably involves quite a bit of template or source modification. -------------------- |
|
|
|
Sep 5 2004, 06:56 AM
Post
#10
|
|
|
Member ![]() ![]() Group: Members Posts: 169 Joined: 19-July 04 From: Perth, Australia Member No.: 116,989 |
Yep... thought so. All the links are in the skin files, I've tried editing them myself but to no avail
-------------------- |
|
|
|
Sep 13 2004, 03:56 AM
Post
#11
|
|
|
Member ![]() ![]() Group: Members Posts: 169 Joined: 19-July 04 From: Perth, Australia Member No.: 116,989 |
Anyone able to help here...?
-------------------- |
|
|
|
Sep 13 2004, 06:07 AM
Post
#12
|
|
![]() Burn Baby Burn! ![]() ![]() ![]() ![]() Group: Members Posts: 649 Joined: 3-April 04 From: Mexico Member No.: 96,838 IPB Version: Not Applicable |
Hi!
Will this work with third-party portals like MKPortal? Thanks BD -------------------- |
|
|
|
Sep 19 2004, 11:25 PM
Post
#13
|
|
|
Newbie ![]() Group: Members Posts: 35 Joined: 21-April 04 Member No.: 101,962 IPB Version: 1.3.x |
sorry but this mod is just about useless if you dont include instructions on how to change the links all over the forum to use this feature.
|
|
|
|
Oct 28 2004, 08:01 AM
Post
#14
|
|
|
Newbie ![]() Group: Members Posts: 14 Joined: 14-September 03 Member No.: 42,843 IPB Version: 1.3.x |
In my experience if you can get there needs to be a function to start the rewrite and it must appear within the pages <head> tags in effect, so if anyone knows which file would let you do that, then it should work nicely
CODE ob_start(); function replace_for_mod_rewrite(&$s) { $urlin = array( "'(?<!/)index.php'", would do the trick but you must also add the rewrites for every differnt file combination as already stated in the .htaccess. It's been a while since I did this, but it will work with a little perseverence. This post has been edited by badger: Oct 28 2004, 08:03 AM |
|
|
|
Dec 18 2004, 11:36 PM
Post
#15
|
|
|
Newbie ![]() Group: Members Posts: 3 Joined: 10-June 03 Member No.: 18,848 |
What hack mod ?
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 16th March 2010 - 07:55 PM |