Page Index Toggle Pages: 1 Print
Shorten the Forum URL (Read 5817 times)
Captain John
Ex Member


Shorten the Forum URL
Sep 26th, 2007 at 8:31pm
Print Post  
The shorter URL trick with YaBB2.*:

    Note replace yourdomain with your domain name !

Open Security.pl and find this (line 23)

Code
Select All
$scripturl=qq~$boardurl/YaBB.$yyext~; 




Replace with

Code
Select All
$scripturl=qq~http://www.yourdomain.com/forum/~; 




Open Load.pl and find this (line 574)

Code
Select All
if (!$scripturl) { $scripturl = qq~$boardurl/YaBB.$yyext~; } 



and replace with

Code
Select All
if (!$scripturl) { $scripturl = qq~http://www.yourdomain.com/forum/~; } 




And finally, if you'd like to make it work for admins as well, as there's a link back to the forum in the admin center, open AdminIndex.pl and find this:

Code
Select All
$topmenu_one  = qq~<span style="font-size: 12px; font-family: tahoma, sans-serif;">
 <ahref="$boardurl/YaBB.$yyext">$admintxt{'15'}</a></span>~; 




replace with

Code
Select All
$topmenu_one=qq~<span style="font-size: 12px; font-family: tahoma, sans-serif;">
 <a href="http://www.yourdomain.com/forum/">$admintxt{'15'}</a></span>~; 




And finally, create a .htaccess file which contains the line below and place it in your DirectoryIndex ../cgi-bin/yabb/YaBB.pl

http://www.yourdomain.com/forum dir:

Where ../cgi-bin/yabb/YaBB.pl is the relative path to YaBB.pl.

Notice that in some cases (depending of the server setup) when you change $scripturl part, the trailing forward slash (http://www.yourdomain.com/forum/) needs to be in there, or logging in won't work!

Also note this that .htaccess doesn't work in all servers, only with Apache HTTP server which is running in *nix-like server or on Windows NT based server (for example Windows 2000).

********************************************************

There may also be some restrictions which prevent the above from working in which case a simple sort-of-but-not-quite-workaround would be using only a .htaccess file with this in it:

Redirect permanent /forum http://www.yourdomain.com/cgi-bin/yabb/YaBB.pl


Is you use the above redirect, then DO NOT make the $scripturl edits (above the *** line) !


« Last Edit: Jan 15th, 2008 at 3:02pm by »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Print
 
  « Board Index ‹ Board  ^Top