VBulletin SEO URL Rewriting
August 19, 2007 · Print This Article
- Place the code below in the .htaccess.
CODE:
-
RewriteRule ^t([0-9]+)-(.*).html$ showthread.php?t=$1 [L]
-
RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
-
RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
-
RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?forumid=$1 [L]
-
- Edit the functions_forumlist.phpSearch for:
CODE:
-
$forum['statusicon'] = fetch_forum_lightbulb($forumid, $lastpostinfo, $forum);
and below that add
CODE:-
$forum['url'] = strtolower(str_replace(" ", "-",str_replace("/", "-", $forum['title'])));
-
$forum['url'] = strtolower(str_replace("'", "",str_replace("/", "-", $forum['title'])));
-
- Edit the forumdisplay.php.Search for:
CODE:
-
$thread = process_thread_array($thread, $lastread, $foruminfo['allowicons']);
and below that add
CODE:-
$thread['url'] = strtolower(str_replace(" ", "-", $thread['threadtitle']));
-
$thread['url'] = strtolower(str_replace("'", "", $thread['threadtitle']));
-
$thread['url'] = ereg_replace("[/?!.$%£()~*@]+", "", $thread['url']);
-
- Edit the threadbit template.Search for:
CODE:
-
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]">
and below that add
CODE:-
</a><a href="t$thread[threadid]-$thread[url].html">
-
- Change the following template:
Search the following:CODE:Replace with:-
</a><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">
CODE:-
</a><a href="$forum[url].html">
-





[...] discussed the steps to setup the URL rewriting for VBulletin. For those forums using GARS, here are the [...]