1. 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

Discussion in 'XenForo Pre-Sales Questions' started by ibrian, Aug 10, 2014.

  1. ibrian

    ibrian Active Member

    A question about Kier's redirection script:

    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?
  2. Mike

    Mike XenForo Developer Staff Member

    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.
  3. ibrian

    ibrian Active Member

    I'm looking to maintain IDs - it'll be imported into a new install - so perhaps just a set of rewrite rules would work? In which case, would these be the same as via Kier's redirect script (http://tools.geekpoint.net/xfseo/)?
  4. Mike

    Mike XenForo Developer Staff Member

    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).
  5. ibrian

    ibrian Active Member

    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.
  6. Slavik

    Slavik XenForo Moderator Staff Member

    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 :)
    ibrian likes this.

Share This Page