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

XF 1.1 Swapped Wordpress for XF in Root, need redirect help

#1
Hi,

I had wordpress in my root directory but have moved it from 3dsbuzz.com to 3dsbuzz.com/archive, and moved my XF installation into the root from 3dsbuzz.com/3ds-forum to 3dsbuzz.com.

Both are working correctly but I need to get the old URLs to redirect to either the new URLs (from 3dsbuzz.com/post-name/ to 3dsbuzz.com/archive/post-name/) or back to the homepage instead of me just having lots of XF error messages.

I've been playing around with .htaccess but don't really know what I'm doing.
 
#2
Sorry, I'm still suffering and need to bump this. What does the .htaccess file need to include to redirect dead URLs to the same URL but with "archive/" at the start?
 

SneakyDave

Well-known member
#4
I think the main issue you have is that both WP and xenForo use index.php to route everything, which makes it hard to create a regexp to figure out what visitors are trying to get to, an xF thread, or a WP article/post.

How many WP entries, categories, tags do you have? If it's a small number, maybe you can just list individual redirects to that content?

Edit: sorry, didn't see that you listed your site, I'm taking a look to see if there's something that can be figured out easily.
 

SneakyDave

Well-known member
#5
Looks like some of your links on your archives page are still pointing to your original WP installation, like the "See more 3DS updates" button at the bottom, and your link to "Every 3DS Buzz Post Ever" at the top.

Just an FYI, doesn't help your redirect problem. It would be easier if your forums weren't in the root directory.
 

Jake Bunce

XenForo moderator
Staff member
#6
Add this to the top of the .htaccess file in the web root:

Code:
RewriteEngine On

RewriteRule ^(post-name1|post-name2|post-name3)/$ /archive/$1/ [R=301,L]
You need to manually specify every Wordpress slug that you want to redirect, separated by a pipe (|).
 
#7
Sorry it's taken me nearly a month to respond. Thanks very much Jake. That works well for a a few posts but is there anyway to get it working for all of them? If I use that format for all of my posts, my server can't handle it and just gives 500 errors.
 

Jake Bunce

XenForo moderator
Staff member
#8
Sorry it's taken me nearly a month to respond. Thanks very much Jake. That works well for a a few posts but is there anyway to get it working for all of them? If I use that format for all of my posts, my server can't handle it and just gives 500 errors.
You might have to duplicate the rule to cover all of the slugs without exceeding limits for a single rule.