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

Wordpress + Xenforo

Discussion in 'XenForo Questions and Support' started by Hesesses, Jan 7, 2013.

  1. Hesesses

    Hesesses Member


    I have Xenforo installed to my domain root (domain.com)
    Now I have installed wordpress to /wordpress (domain.com/wordpress)

    What is the best way to configure everything to have wordpress showing when user goes to my site (domain.com) and xenforo would be showing on domain.com/forum.

    Also I'm wondering could it be possible somehow to have old forum links redirected to "new" links? (domain.com/threads/my-thread-name.100/ would redirect to domain.com/forum/threads/my-thread-name.100)
  2. Digital Doctor

    Digital Doctor Well-Known Member

    I'd change Xenforo to /community and put Wordpress in the Root.
    Most people do it this way.
    Jake Bunce and LPH like this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Put this in your .htaccess file in the web root:

    RewriteEngine On
    RewriteRule ^(threads|forums|members)/(.*)$ /forum/$1/$2 [R=301,L]
    You need to specify each XenForo route that you want to redirect to the new location. I included the important routes above. The rest don't matter as much.

    And you need to make sure WordPress doesn't share any of these routes, otherwise you have a problem.
    Hesesses likes this.
  4. cclaerhout

    cclaerhout Well-Known Member

    Wordpress has a dedicated option to easily do what you want. What you need is to create an index.php file with some specific code inside... I have to find back the tutorial.
    Here it is (I'm not sure it's the one I used before): http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Just to show you how my root index file looks now:
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     * @package WordPress

     * Tells WordPress to load the WordPress theme and output it.
     * @var bool

    /** Loads the WordPress Environment and Template */

    I would love to see that for XenForo too ;)
    LPH, Digital Doctor and Jake Bunce like this.
  5. Hesesses

    Hesesses Member

    Thanks for your reply.

    I tried that but it is not working..

    I have this in my .htaccess:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteRule ^(threads|forums|members)/(.*)$ /community/$1/$2 [R=301,L]
  6. Hesesses

    Hesesses Member

    I got it working by moving "RewriteRule ^(threads|forums|members)/(.*)$ /community/$1/$2 [R=301,L]" after "RewriteEngine On" Thanks for helping
    Jake Bunce likes this.

Share This Page