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

Converting WordPress links to XenForo?

Discussion in 'Styling and Customization Questions' started by Lucas, May 8, 2012.

  1. Lucas

    Lucas Well-Known Member

    I'm interested in redirecting old WordPress URL's to point to our forum threads (posted as news), any ideas on how I can learn to do such a thing or a little hand on doing it if it's simple?

    Help is greatly appreciated!
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Are these specific redirects? There is no direct WP importer so I assume you are redirecting individual URLs. You can use a .htaccess rule like this to redirect a specific URL:

    RedirectMatch 301 ^/path/to/wp/article/$ /forum/threads/1/
    You can duplicate this line to specify other individual redirects.
  3. Andy.N

    Andy.N Well-Known Member

    This is something I'm curious as well. The thought of moving WP to XenCarta has entered my mind at some point in the past so I just want to see how other people approach this.
  4. Lucas

    Lucas Well-Known Member

    Basically "/2012/02/beta-key-signup-survey-live/" should go to /threads/beta-key-signup-survey-live.XXX/
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That rule will work then. Use this:

    RedirectMatch 301 ^/2012/02/beta-key-signup-survey-live/$ /threads/beta-key-signup-survey-live.XXX/
    If this is going in XenForo's .htaccess file then it should go at the very top.
  6. Lucas

    Lucas Well-Known Member

    Well, I'm looking for a solution that dynamically updates all links, since there are several articles, not just one. Hope that clears it up a bit. Is this done with rewrite engine instead of Redirect?
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I just remembered I did your WP import. ;)

    For generic redirects you need an id map. In the case of a double import like yours there is no direct id map, though it may be possible to setup the map with some extra effort, similar to this:

  8. Lucas

    Lucas Well-Known Member

    Yeah unfortunately it imported everything in the HTML and would of had to edit every single news item for it to work in our news so I manually imported each news (I know, I'm crazy).

Share This Page