@Jake Bunce: Thanks for the quick reply.
Remove (or rename) the /forums directory.
Then add these rules to the top of the .htaccess file in your web root:
Code:
RewriteEngine On
RewriteRule ^forums/showthread\.php$ /showthread.php [R=301,L]
@Jake Bunce: Thanks for the quick reply.
RewriteEngine On
RewriteRule ^forums/showthread\.php$ /showthread.php [R=301,L]
Three weeks later and I just realized I forgot to set up redirects for my vb3 archive directory. I copied the file in but am getting server errors. I'm guessing I need to fix the rewrite for it since it's using vbseo. If I post a sample URL would someone be able to help me with the rewrite code?
http://www.dsmtuners.com/forums/archive/index.php/f-4-p-129.html
Thanks in advance.
Hi Jake, the index.php file already has that fix in it. Here's one of the errors being logged - there are several different errors, all related to vbseo:Need the new URL for the same thread as well.
What is the error? Might need this fix:
http://xenforo.com/community/threads/archive-re-directs.25457/#post-308580
ErrorException: ob_end_clean() [<a href='ref.outcontrol'>ref.outcontrol</a>]: failed to delete buffer. No buffer to delete - forums/vbseo.php:176
Generated By: Unknown Account, A moment ago
Stack Trace
#0 [internal function]: XenForo_Application::handlePhpError(8, 'ob_end_clean() ...', '/home/dsmtuner/...', 176, Array)
#1 /home/site/public_html/forums/vbseo.php(176): ob_end_clean()
#2 {main}
Request State
array(3) {
["url"] => string(64) "http://www.dsmtuners.com/forums/archive/index.php/f-4-p-180.html"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
Any ideas on the error? I'm wondering if I should just pull the redirect file and forget the redirect for archives.
If I delete vBSEO wouldn't it mess up the old site links that are indexed in google?
This is the old link:
http://www.dsmtuners.com/forums/archive/index.php/f-4-p-129.html
Here is the link structure of a random thread on the new site:
http://www.dsmtuners.com/threads/major-changes-coming-to-dsmtuners.475739/
Is that what you need?
Jake, can you explain how this would work for a site that was using vBSEO?Ideally you would be using a redirect method which directly redirects the old URLs such that vBSEO is not needed.
Here's a link to an old thread in the archive:I need the old and new URL of the same content (e.g. thread). Then I can construct rewrite rules for you.
Jake, can you explain how this would work for a site that was using vBSEO?
Here's a link to an old thread in the archive:
http://www.dsmtuners.com/forums/index.php/newbie-forum/371342-carbon-build-up-exhaust.html
And here's where it is in XF:
http://www.dsmtuners.com/threads/carbon-build-up-on-exhaust.371342/
RewriteEngine On
RewriteRule ^forums/index\.php/[^/]+/([0-9]+)-[^\.]+\.html$ /threads/$1/ [R=301,L]
I edited all the files to work for both vb3 & vb2 links.if anyone needs htem I'd be happy to provide the edits
if the links are like this
http://www.sternfannetwork.com/forum/showthread.php?s=&p=924138
or
http://www.sternfannetwork.com/forum/showthread.php?t=301353
they work but my broken links aren't like that. mine spell out postid & threadid like this
http://www.sternfannetwork.com/forum/showthread.php?s=&postid=924138
http://www.sternfannetwork.com/forum/showthread.php?threadid=301353
I still have vb2 links hanging around, which I'd also like to redirect. Would you (or anybody else) please provide me with the modifications required to make these great redirection scripts work for both links types, as you described below?
Thanks a bunch in advance!
$input = $inputHandler->filter(array(
't' => XenForo_Input::UINT,
'p' => XenForo_Input::UINT,
'threadid' => XenForo_Input::UINT,
'postid' => XenForo_Input::UINT
));
$input['t'] = ($input['threadid'] ? $input['threadid'] : $input['t']);
$input['p'] = ($input['postid'] ? $input['postid'] : $input['p']);
$importModel = XenForo_Model::create('XenForo_Model_Import');
$target = false;
if ($input['t'])
{
'postid' => XenForo_Input::UINT,
Just a thing, I believe there's a comma missing at the end of this line, which I added myself, as not having it broke the script:
Code:'postid' => XenForo_Input::UINT,
Anyway, thanks again! Cheers!
RewriteEngine on
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]
We use essential cookies to make this site work, and optional cookies to enhance your experience.