XF 1.5 Redirect After Importing

#1
I'm just finishing an import from XenForo 1.2.9 to XenForo 1.5.20 Beta 2, and I got to the step about redirecting from the old domain. I read the instructions here:

https://xenforo.com/help/importing/

It says how you should redirect traffic from the old pages, and then it gives links of redirect scripts to download. The scripts are for:

Redirection scripts for vBulletin 3.x
Redirection scripts for vBulletin 4.x (unofficial)
Redirection Scripts for IP.Board 3.x

There is nothing for Xenforo itself. I then went to the link below that:

https://xenforo.com/help/import-redirection/

That gives details about archiving the import log data which I already did. Then it says to download the appropriate redirect scripts and fill in some data. It gives a link to download the redirect scripts:

https://xenforo.com/help/importing/#redirect-scripts

I go to that link, and that turns out to be the first link that I was at above. Which is fine, except for the fact that there still is no redirect script for Xenforo.

How do I set it up to redirect from my old Xenforo version to my newer Xenforo version that I imported to? Is there some kind of built-in script for this that the instructions don't mention?

Thank you very much for your help!
 

ftsservice

Active member
#4
If he did it as a fresh install on the new domain, then imported, IDs can get messed up. Normally not, especially retaining IDs, but if they weren't retained and he did some test runs, then the ids won't match. And in that case, redirection is not possible because there's a big chance IDs overlap.


Now if the question is about redirecting from the old domain to the new that's easy (assuming Apache web server in this example). In .htaccess on the old domain installation (before any other redirect rules):

RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
 
#5
Thank you for the info, both of you. Actually, I didn't explain everything clearly in my original post. The reason I am importing from one version to another is that I am merging two sites together. There is one forum on the "old domain", and a totally different forum on the "new domain". Both forums have been around for years. Right now it's redirecting any link from the old domain to the main URL or the new domain. But in order to avoid getting dinged by the search engines, I wanted to have a link to a thread on the old domain go directly to the same thread on the new domain. But since the new forum already existed for years, all of the IDs are likely different on there than they were on the old domain.
 

ftsservice

Active member
#6
Because the thread ids might overlap, it makes it difficult, but it can be done.

For instance:
Code:
www.forum1.com/threads/this-is-a-thread.4001/
www.forum2.com/threads/this-is-a-different-thread.4001/ is now www.forum1.com/threads/this-is-a-different-thread.42807/
Normally, XF's redirection isn't going to work because it won't know if 4001 is for the imported forum (to redirect to new thread id 42807) or for the forum it was imported into (in which case it wouldn't redirect).

I could do it with a custom php redirect script I wrote, by modifying it to handle Xenforo->Xenforo. It would grap the URL only if its requested from imported domain, look up the new thread id and then redirect to that. Send me a conversation message if you're interested.
 
Top