vBulletin mod_rewrite

Reply

Join Date: Oct 2004
Posts: 34
Reputation: KeithMcL is an unknown quantity at this point 
Solved Threads: 0
KeithMcL's Avatar
KeithMcL KeithMcL is offline Offline
Light Poster

Re: vBulletin mod_rewrite

 
0
  #131
Oct 16th, 2004
Hi,

For those of you having problems displaying sub-forums on your homepage here is the fix.

Open includes/functions_forumlist.php

Look for the line that reads (around line 527):
[php]$forum = $forumcache["$forumid"];[/php]And below that add
[php]// added by keith
$forum['url'] = strtolower(str_replace(" ", "-",str_replace("/", "-", $forum['title'])));
// added by keith[/php]That should do it

If you have any problems let me know and I'll see what I can do.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7
Reputation: nkisberg2000 is an unknown quantity at this point 
Solved Threads: 0
nkisberg2000 nkisberg2000 is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite

 
0
  #132
Oct 16th, 2004
I used Cyber-SEO's little hack for the nav bar but have found a problem...

For some reason on page http://www.cardschat.com/t19-%5Bblog...-showdown.html

it only links to main-category.html not f1-main-category.html typa thing, any ideas?
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 34
Reputation: KeithMcL is an unknown quantity at this point 
Solved Threads: 0
KeithMcL's Avatar
KeithMcL KeithMcL is offline Offline
Light Poster

Re: vBulletin mod_rewrite

 
0
  #133
Oct 16th, 2004
Originally Posted by Natch
Now, search for every instance of [php]$userinfo['where'][/php]which refers to the three $filename instances above and alter the <a href="... statement to match the rewritten display of your URLs...

examples

[php]$userinfo['where'] = "<a href=\"f$forumid-" . mod_rewrite_title($forumtitle) . ".html\">$forumtitle</a>";

$userinfo['where'] = "<a href=\"t$threadid-" . mod_rewrite_title($threadtitle) . ".html\" title=\"$threadpreview\">$threadtitle</a>";

$userinfo['where'] = "<a href=\"post$postid.html#postid=$postid\" title=\"$threadpreview\">$threadtitle</a>";[/php]
There is a slight error in the code above.

Where it reads:
[php]$userinfo['where'] = "<a href=\"t$forumid-" . mod_rewrite_title($threadtitle) . ".html\" title=\"$threadpreview\">$threadtitle</a>";[/php]it should in fact read
[php]$userinfo['where'] = "<a href=\"t$threadid-" . mod_rewrite_title($threadtitle) . ".html\" title=\"$threadpreview\">$threadtitle</a>";[/php]
Last edited by cscgal; Oct 17th, 2004 at 11:23 pm.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7
Reputation: nkisberg2000 is an unknown quantity at this point 
Solved Threads: 0
nkisberg2000 nkisberg2000 is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite

 
0
  #134
Oct 17th, 2004
Basically, Using Cyber-SEO's code could someone make a way for navbar to work for Ted's/Keithmcl's method with the fX-keyword-keyword without mod-rewrite.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 16
Reputation: Natch is an unknown quantity at this point 
Solved Threads: 0
Natch Natch is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite

 
0
  #135
Oct 17th, 2004
Originally Posted by KeithMcL
There is a slight error in the code above.

Where it reads:
[php]$userinfo['where'] = "<a href=\"t$forumid-" . mod_rewrite_title($threadtitle) . ".html\" title=\"$threadpreview\">$threadtitle</a>";[/php]it should in fact read
[php]$userinfo['where'] = "<a href=\"t$threadid-" . mod_rewrite_title($threadtitle) . ".html\" title=\"$threadpreview\">$threadtitle</a>";[/php]
Thanks KeithMcL: Dani - can you please edit my post to rectify my typo?
Natcher00 ... is the Admin @ MobileForces.org - Official Community for a cult Vehicle based FPS - the only place for support!
[vB.org] PNG24 transparency with IE * DaniWeb: mod_rewrite your vB
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,040
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 128
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

 
0
  #136
Oct 17th, 2004
Ok, Edited
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,040
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 128
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

 
0
  #137
Oct 21st, 2004
Just to let everyone know, Keith was generous enough to have rewritten this tutorial combining my hack as well as Ted's.

http://www.daniweb.com/tutorials/12725.html
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 1
Reputation: The Equivocate is an unknown quantity at this point 
Solved Threads: 0
The Equivocate The Equivocate is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite

 
0
  #138
Oct 21st, 2004
I noticed that when you go to click on the latest post, the target url is "newpostinthread3.html" but when you click it, it links you to "showthread.php?p=3#post3" so did I do something wrong? Yet when you are viewing the forum and click on that thread, it shows "thread3.html"

And also, I want to fix the Online Location problem, but Natch's solution was too hard for me to figure out, so is there an easier way? Or one that goes into more detail so I can figure it out?
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 2
Reputation: achtungbaby is an unknown quantity at this point 
Solved Threads: 0
achtungbaby's Avatar
achtungbaby achtungbaby is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite

 
0
  #139
Oct 23rd, 2004
Wow. Tremendous hack.

I have a dumb question though: I don't suppose you also have a handy-dandy redirect that will point my .html pages back to the .php ones, in the event that I'm not able to keep this hack up to date...? When I was using invisionboard a while back I'd used a hack similar to this one and it worked fine, but over time I wasn't able to keep all of the necessary edits going and soon abandoned. Unfortunately, I had spiders looking for .html pages for quite some time...
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3
Reputation: fate is an unknown quantity at this point 
Solved Threads: 0
fate fate is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite

 
0
  #140
Oct 24th, 2004
hi. just for a test i put the following into the .htaccess file in the root dir of my forum:
  1. RewriteEngine on
  2. Options +FollowSymLinks
  3. RewriteRule ^thread([0-9]+).html$ showthread.php?t=$1 [L]
  4. RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
  5. RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
  6. RewriteRule ^forum([0-9]+).html$ forumdisplay.php?f=$1 [L]
  7. RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?forumid=$1 [L]
  8. RewriteRule ^post([0-9]+).html$ showthread.php?p=$1 [L]
but that made no difference whatsoever. no links changed anywhere. my hoster says that there is a workin mod_rewrite on the servers, but how come nothing works?

ps: my forum is on a subdomain.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC