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

Setting up redirects (Moving forum to a sub-directory)

Discussion in 'Installation, Upgrade, and Import Support' started by Andrej, Jun 19, 2013.

  1. Andrej

    Andrej Well-Known Member

    Currently my forum is located at domain.com. I want to move it to domain.com/community and place Wordpress at root.

    I want to setup an redirect so anyone visiting domain.com/threads/successful-upgrade-minor-problem.52851/ (lets say this is a example from an google search) would get redirected to the new domain.com/community/threads/successful-upgrade-minor-problem.52851/ URL. So people coming from Google won't simply stumble upon a dead link.

    At same time, if a visitor is visiting domain.com directly, he would be seeing Wordpress.

    I believe it is called a 301 redirect, but I am not sure how I can accomplish this. Please help me. :)
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Andrej

    Andrej Well-Known Member

    @Brogan Thanks for the link. If I understand @Jake Bunce correctly, I only need to add this:
    RewriteRule ^(threads|forums|members)/(.*)$ /community/$1/$2 [R=301,L]
    to the XF's default .htaccess file and update the Board URL?
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You need to add all of the routes you want to redirect, for example you may want to include 'posts' amongst others.
    Andrej likes this.

Share This Page