vBSEO redirects

Majora

Member
Hello,
i switch from vbulletin 4 + vBSEO to xenForo. Now i want to redirect the old url's in the google index to the new xenForo URL's: http://www.google.de/#sclient=psy-a....,cf.osb&fp=2f285c08b7a2cb86&biw=1680&bih=946

I have used this script http://tools.geekpoint.net/xfseo/ and insert
Code:
RewriteEngine on
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]

to my .htaccess
but the URL's still not redirect me to the new URL's


Best regards,
Majora
 
Test it using the Chrome browser. Some other browsers (like Firefox) tend to cache these things.

If the problem persists then send me a PM with the test URLs and FTP access and I will take a look.

So if I have .html with the url

RewriteEngine On

RewriteRule ^f([0-9]+)$ /forums/$1/ [R=301,L]
RewriteRule ^t([0-9]+)$ /threads/$1/ [R=301,L]

How can put it to work.

Also I want use it always same like http://www.yourname.com/t8521 instead of http://www.yourname.com/threads/8521/ not only redirect URL can be that with xenforo?
 
I'll try from another computer, This rules for vb to xen ture? Because I removed VB.

Those instructions will work without vB installed.

So if I have .html with the url

RewriteEngine On

RewriteRule ^f([0-9]+)$ /forums/$1/ [R=301,L]
RewriteRule ^t([0-9]+)$ /threads/$1/ [R=301,L]

How can put it to work.

Also I want use it always same like http://www.yourname.com/t8521 instead of http://www.yourname.com/threads/8521/ not only redirect URL can be that with xenforo?

I need an example URL. The instructions I posted are only for the specific URL examples that you posted.
 
Those instructions will work without vB installed.



I need an example URL. The instructions I posted are only for the specific URL examples that you posted.


Sure.

1-) If I want redirect URL for this I put .HTML what need to put in .htaccess

forums VB4 with Vbseo : http://www.yourname.com/f4.html
forums Xenforo : http://www.yourname.com/forums/4/

threads VB4 with Vbseo : http://www.yourname.com/t8521.html
threads Xenforo : http://www.yourname.com/threads/8521/

2-) So, My question is .. After redirect links is shown in this way in the Forum Xenforo example below,

OLD forum http://www.yourname.com/f4 After redirect to NEW forum http://www.yourname.com/forums/4/ it's remains with this http://www.yourname.com/forums/4/

I want to keep setting same was have in vBseo vb4 I mean want change that in my xenforo same like old forum http://www.yourname.com/f4, http://www.yourname.com/f5, http://www.yourname.com/f6 etc. Be permanently for threads & forums & post inside Xenforo forum there any options or any way or add-ons for this.
 
Last edited:
1) Use this for the .html URLs:

Code:
RewriteEngine On

RewriteRule ^f([0-9]+)\.html$ /forums/$1/ [R=301,L]
RewriteRule ^t([0-9]+)\.html$ /threads/$1/ [R=301,L]

2) You have some control over the XF URLs with route filters:

Admin CP -> Home -> Route Filters

But they won't allow you that exact same format as vB.
 
I assume that last number is a page number?

Code:
RewriteEngine On

RewriteRule ^t([0-9]+)-([0-9]+)$ /threads/$1/page-$2 [R=301,L]

Yes is correct, Thanks

Is there any solution to keep of all the links as they are we have inside Xenforo permanently,

instead of .com/threads/1000/ to .com/t1000

I hope found some solution
 
I'm looking to redirect specific nodes from my old vbulletin + vbseo forum to two different xenforo forums as I have separated the forums while switching to xenforo and I can't have the same content on both as it would be duplicate.

The following old vb node and all it's threads (example: /f145/new-here-335901/ ) should redirect to http://forum.domain1.com/threads/...

and a different old vb node and all it's threads (example: /f241/hello-world-433062/ ) should redirect to http://forum.domain2.com/threads/...

Any idea how could this work? I'm ok with adding individual rules for each old node as I don't have many but the idea is that all threads inside of that node to be redirected correctly to either first or second forum depending on the rule.
 
Last edited:
I'm looking to redirect specific nodes from my old vbulletin + vbseo forum to two different xenforo forums as I have separated the forums while switching to xenforo and I can't have the same content on both as it would be duplicate.

The following old vb node and all it's threads (example: /f145/new-here-335901/ ) should redirect to http://forum.domain1.com/threads/...

and a different old vb node and all it's threads (example: /f241/hello-world-433062/ ) should redirect to http://forum.domain2.com/threads/...

Any idea how could this work? I'm ok with adding individual rules for each old node as I don't have many but the idea is that all threads inside of that node to be redirected correctly to either first or second forum depending on the rule.

If you preserved the same thread ids during the import then you can add these rules to the top of the .htaccess file where vB is/was installed:

Code:
RewriteEngine On

RewriteRule ^f145/[^/]+-([0-9]+)/ http://forum.domain1.com/threads/$1/ [R=301,L]
RewriteRule ^f241/[^/]+-([0-9]+)/ http://forum.domain2.com/threads/$1/ [R=301,L]
 
Thanks for the answer, @Jake Bunce. Facing some issues though.
Code:
RewriteEngine On

RewriteRule ^f145/[^/]+-([0-9]+)/ http://forum.domain1.com/threads/$1/ [R=301,L]
RewriteRule ^f241/[^/]+-([0-9]+)/ http://forum.domain2.com/threads/$1/ [R=301,L]

RewriteRule f[\d]+/.+-([\d]+)/index([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule f[\d]+/.+-([\d]+)/ showthread.php?t=$1 [NC,L]
RewriteRule f([\d]+)/index([\d]+).html forumdisplay.php?f=$1&page=$2 [NC,L]
RewriteRule f([\d]+)/ forumdisplay.php?f=$1 [NC,L]


Added the rules on the top of my old vb folder .htaccess but seems it's still redirecting to the basic forum.domain1 link http://forum.domain1.com/f145/new-here-335901/ (also not displaying any thread due to the wrong url) instead of http://forum.domain2.com/threads/...

I think the vbseo rules are somehow nulling your two rules.

Also I did preserved the same thread ids and replaced the right domain names too.


My 301config.php placed inside the old vbulletin folder

Code:
$fileDir = '/var/www/forums';

define('IMPORT_LOG_TABLE', 'archived_import_log');

define('INCLUDE_PAGE_LINKS', false);
 
Last edited:
Thanks for the answer, @Jake Bunce. Facing some issues though.
Code:
RewriteEngine On

RewriteRule ^f145/[^/]+-([0-9]+)/ http://forum.domain1.com/threads/$1/ [R=301,L]
RewriteRule ^f241/[^/]+-([0-9]+)/ http://forum.domain2.com/threads/$1/ [R=301,L]

RewriteRule f[\d]+/.+-([\d]+)/index([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule f[\d]+/.+-([\d]+)/ showthread.php?t=$1 [NC,L]
RewriteRule f([\d]+)/index([\d]+).html forumdisplay.php?f=$1&page=$2 [NC,L]
RewriteRule f([\d]+)/ forumdisplay.php?f=$1 [NC,L]


Added the rules on the top of my old vb folder .htaccess but seems it's still redirecting to the basic forum.domain1 link http://forum.domain1.com/f145/new-here-335901/ (also not displaying any thread due to the wrong url) instead of http://forum.domain2.com/threads/...

I think the vbseo rules are somehow nulling your two rules.

Also I did preserved the same thread ids and replaced the right domain names too.


My 301config.php placed inside the old vbulletin folder

Code:
$fileDir = '/var/www/forums';

define('IMPORT_LOG_TABLE', 'archived_import_log');

define('INCLUDE_PAGE_LINKS', false);

Which domain was vB on? domain1, domain2, or neither? You say the URL is being wrongly redirected to domain1 while preserving the vB format. That might imply that there is another redirect in play in which case it might be appropriate to add my redirect rules to the .htaccess file on domain1.
 
Yes, you are correct @Jake Bunce it preserved the old vb format because in apache virtualhost I changed the old vb vhost settings to point to the new xenforo folder instead of leaving the old one where vb was installed. I switched it back to point to the old vb folder. Also vb was indeed on a different domain and a different folder too, same host though.

I just reapplied all redirect rules from scratch (vb import rules + vbseo rules) and seems the redirect is working partially now. The redirect form is correct now but all links are directed to forum.domain1.com even though I have certain nodes to redirect to forum.domain2.com (it's like the two rules I've added don't have any effect)

Example:

All threads from node f145 (and all other nodes) are redirected correctly to http://forum.domain1.com/threads/... but that is because this is the main domain where the old vb forum redirects to now.

All threads from specified nodes (like f241) should be redirected to http://forum.domain2.com/threads/... but they are not, they are still redirected to http://forum.domain1.com/threads/...

The 2 rewrite rules you gave me are added inside the .htaccess where xenforo is installed. (tried placing them in vbulletin folder as well but no result either)
 
Last edited:
Yes, you are correct @Jake Bunce it preserved the old vb format because in apache virtualhost I changed the old vb vhost settings to point to the new xenforo folder instead of leaving the old one where vb was installed. I switched it back to point to the old vb folder. Also vb was indeed on a different domain and a different folder too, same host though.

I just reapplied all redirect rules from scratch (vb import rules + vbseo rules) and seems the redirect is working partially now. The redirect form is correct now but all links are directed to forum.domain1.com even though I have certain nodes to redirect to forum.domain2.com (it's like the two rules I've added don't have any effect)

Example:

All threads from node f145 (and all other nodes) are redirected correctly to http://forum.domain1.com/threads/... but that is because this is the main domain where the old vb forum redirects to now.

All threads from specified nodes (like f241) should be redirected to http://forum.domain2.com/threads/... but they are not, they are still redirected to http://forum.domain1.com/threads/...

The 2 rewrite rules you gave me are added inside the .htaccess where xenforo is installed. (tried placing them in vbulletin folder as well but no result either)

Even with your virtual hosts and other rewrite rules... this should be working.

I can take a look if you give me FTP access and some real URLs to work with.
 
It might help to use Chrome, right click and Inspect the page, click the Network tab. Then load one of the old vB URLs. The network tab will show all redirections including multiple redirections. That will allow you to see exactly what is happening with the old URL. There may be multiple redirects in play here between your apache config, .htaccess files, PHP redirect scripts, and maybe vBSEO.

Your description makes it sound like my rewriterule is not being hit. Or maybe it's just not matching... it matches a specific format based on your example format. If, for example, your test URL is missing the ending slash that is present in the rule then it won't match.

Basically this requires debugging.
 
Top Bottom