After moving to my new dedicated web server, I was having problems viewing the Archive. When you'd click on Archive, it would simply redirect you back to the forum home page. This also means that search engines are probably not crawling your site very much, as the archive feature was designed to consolidate the posts on your forum into a search engine friendly format.
After doing some research I discovered that this was due to the fact that PHP is running under CGI on my server instead of as a module. Further research and piecing together info from other posts, I ended up with the following fix, which works GREAT on my forum. Thanks to Martin at vBulletin -Germany for the hack, and Scott MacVicar for the index.php bugfix.
As always, backup your files first, and make changes at your own risk! This fix only applies to: vBulletin 3.0.1
##########################
# /archive/index.php find this: #
##########################
####################
# -> Replace with this #
####################
##########################
# /archive/index.php find this: #
##########################
####################
# -> Replace with this: #
####################
##########################################
# /archive/index.php - Comment out or remove this line: #
#########################################
##########################
# /archive/global.php find this #
##########################
####################
# -> Replace with this: #
####################
Now, create a .htaccess file and place this file in the /archive/ directory. The .htaccess file should contain the following:
RewriteEngine on
RewriteBase /XXXX/archive/
RewriteRule ^(f-|t-)+([0-9]+)?(-p-[0-9]+)? index.php?a=$1$2$3
Be sure to replace XXXX with the directory for your forum.
Good Luck!!
J.R. Rogers
After doing some research I discovered that this was due to the fact that PHP is running under CGI on my server instead of as a module. Further research and piecing together info from other posts, I ended up with the following fix, which works GREAT on my forum. Thanks to Martin at vBulletin -Germany for the hack, and Scott MacVicar for the index.php bugfix.
As always, backup your files first, and make changes at your own risk! This fix only applies to: vBulletin 3.0.1
##########################
# /archive/index.php find this: #
##########################
PHP Code:
if (strpos($_SERVER['PHP_SELF'] , '/archive/index.php/') === false)
{
exec_header_redirect("$vboptions[bburl]/archive/index.php/");
}
# -> Replace with this #
####################
PHP Code:
$endbit = '';
if (isset($_GET['a']))
{
$endbit = preg_replace('#[^[:alnum:]-]#', '', trim($_GET['a']));
}
# /archive/index.php find this: #
##########################
PHP Code:
$foruminfo = fetch_foruminfo($f);
# -> Replace with this: #
####################
PHP Code:
$foruminfo = fetch_foruminfo($f, false);
# /archive/index.php - Comment out or remove this line: #
#########################################
PHP Code:
$endbit = str_replace('.html', '', substr(strrchr($_SERVER['PHP_SELF'], '/') , 1));
# /archive/global.php find this #
##########################
PHP Code:
if ((!empty($servertoobusy) AND $bbuserinfo['usergroupid'] != 6) OR $vboptions['archiveenabled'] == 0 OR strpos(SAPI_NAME, 'apache') === false)
# -> Replace with this: #
####################
PHP Code:
if ((!empty($servertoobusy) AND $bbuserinfo['usergroupid'] != 6) OR $vboptions['archiveenabled'] == 0)
RewriteEngine on
RewriteBase /XXXX/archive/
RewriteRule ^(f-|t-)+([0-9]+)?(-p-[0-9]+)? index.php?a=$1$2$3
Be sure to replace XXXX with the directory for your forum.
Good Luck!!
J.R. Rogers
Comment