SEO URL Rewriting for GARS
August 19, 2007 · Print This Article
I discussed the steps to setup the URL rewriting for VBulletin. For those forums using GARS, here are the steps.
- Edit geek/gars/mods/display/top.php
Search:CODE:-
$bits .= "<tr><td align=\"$stylevar[left]\"><span class=\"smallfont\"><a href=\"showthread.php?t=$value[threadid]\" title=\"$value[title]\">$value[title]</a></span></td></tr>";
Replaced with
CODE:-
$thread['url'] = strtolower(str_replace(" ", "-", $value[title]));
-
$thread['url'] = strtolower(str_replace("'", "", $value[title]));
-
$thread['url'] = ereg_replace("[/?!.$%£()~*@#]+", "", $thread['url']);
-
$bits .= "<tr><td align=\"$stylevar[left]\"><span class=\"smallfont\"><a href=\"t$value[threadid]-" . $thread['url'] . ".html\" title=\"$value[title]\">$value[title]</a></span></td></tr>";
-
- Edit geek/gars/mods/display/toc.php
CODE:-
$bits.="<li><div class=\"smallfont\"><a href=\"showthread.php?t=$threadinfo[threadid]&garpg=" . ($toc_x + 1). "#content_start\">";
-
$bits.=$this->navigation['pages'][$toc_x]['text'] ? $this->navigation['pages'][$toc_x]['text'] : construct_phrase($vbphrase['GARS_pagex'],($toc_x + 1));
-
$bits.="</a></div></li>";
Replaced with
CODE:-
$thread['url'] = strtolower(str_replace(" ", "-", $this->navigation['pages'][$toc_x]['text'] ? $this->navigation['pages'][$toc_x]['text'] : construct_phrase($vbphrase['GARS_pagex'],($toc_x + 1))));
-
$thread['url'] = ereg_replace("[/?!.$%£()~*@#]+", "", $thread['url']);
-
$bits.="<li><div class=\"smallfont\"><a href=\"a$threadinfo[threadid]-" . ($toc_x + 1). "-$thread[url].html\">";
-
- Edit the following templates
GARS_forumbit_level1_nopost
GARS_forumbit_level1_post
GARS_forumdisplay
GARS_simple_threadbit
GARS_subforumbit_nopost
GARS_subforumbit_post
GARS_threadbitReplace:
CODE:-
showthread.php?$session[sessionurl]t=$thread[threadid]
with
CODE:-
t$thread[threadid]-$thread[url].html
-






Comments
Got something to say?