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

Anyone good with 301 redirects?

Discussion in 'Server Configuration and Hosting' started by petertdavis, Jul 8, 2012.

  1. petertdavis

    petertdavis Well-Known Member

    I could use some advice on this. I always seem to mess up redirects anyway, but this one I'm working on this week is a bit more complex because I'm taking three forums which were on various different software and putting them into one forum on XF.

    So, I'm taking the biggest one which I imported first and going to use the redirection scripts. Hopefully that will work out ok this time.

    My question is with the other two. The second largest one was originally on SMF and converted to vBulletin. What I'd like to do is just redirect all of the old urls to a specific category page.
    So, any url like any of these

    would all redirect to

    Does anyone have a solution to do that? Thanks!
  2. petertdavis

    petertdavis Well-Known Member

    So this is what I have in there now. Dunno if this is the most efficient, perfect solution to the problem.

    RewriteEngine ON
    RewriteRule ^.*$ http://newforumurl.com/category.15/ [R=301,L]
  3. craigiri

    craigiri Well-Known Member

    Peter, Jake is pretty good with redirection - give him a shout if he doesn't see this!
  4. x3sphere

    x3sphere Active Member

    Redirecting a bunch of URLs to a single entry point is not a good idea SEO-wise. Google might see that as an attempt to manipulate rankings. It probably won't hurt you (assuming the site isn't on an unrelated topic), but could diminish the value of those links.
  5. petertdavis

    petertdavis Well-Known Member

    I'm open to better ideas. The links are all pointing to the category on the new forum where I've imported all the posts from the old forum. AFAIK, it is impossible to redirect thread to thread when you've imported multiple forums into a single one. Anyway, we're not talking about a huge number of inbound links here, a handful at the most.
  6. x3sphere

    x3sphere Active Member

    You could write a script that loops through the entire thread table on the old forum, then match the title column against the new database, store the thread/post ID of the matching result in a separate table. Make a relation table for each forum.

    Then configure the redirects accordingly, a request to oldforum1 would look at table1, a request to oldforum2 would look at table2.

    If it's only a handful of links though, probably not be worth the trouble. If we were talking tens of thousands of links then definitely.
    petertdavis likes this.
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    petertdavis likes this.

Share This Page