• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Question on redirect script for imports

ibrian

Well-known member
#1
A question about Kier's redirection script:
http://xenforo.com/community/threads/redirection-scripts-for-vbulletin-3-x.5030/

He mentions about including his files among your vbulletin files.

However, I'm looking to set up my xenforo install on a different domain, import everything from the original domain, and then redirect everything to the new xenoforo domain.

Does this mean I would not be able to use Kier's redirect script for vbseo to xenforo?
 

Mike

XenForo developer
Staff member
#2
The redirects need to cover your old URLs, so you at least need something in place to cover those. The redirect scripts need to be able to access the XF files (and database) to look up IDs. The scripts will redirect to whatever you enter as XF's URL.

There are a few different ways to tackle redirects like this. If you're maintaining IDs, you can get away with just doing redirects via something like .htaccess -- you don't need actual scripts.
 

Mike

XenForo developer
Staff member
#4
You can use that tool to generate the redirects and simply adjust the target to point to the correct URL (using the same method to insert the ID).
 

ibrian

Well-known member
#5
Terribly sorry about this, but I'm afraid I'm a little confused.

.co.uk - vb3 + vbseo domain
.com - XF domain

The vb3 URLs follow a custom structure: /forum/[ID]-[name].html
The XF URLs only contain IDs: /forum/[ID]

I had planned to simply 301 redirect the .co.uk to the .com

But what you're saying is that it would be better to install Kier's script on the .co.uk, and redirect those URLs, before the rule for redirecting the domain to the .com

And the .com with the XF install would need no additional rewrite rules?

Sincere apologies if I've misunderstood.
 

Slavik

XenForo moderator
Staff member
#6
A variety of ways to do it.

I would simply forward everything as is from the .co.uk to the .com

RewriteCond %{HTTP_HOST} ^(.*)domain.com [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

and then have a htaccess on the .com which converts the vbseo url to a normal vb url, and then use the redirect scripts.

You could also do a direct write from vbseo to xenforo if your regex kungfu is good :)