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

htaccess redirect after forum move

Discussion in 'Server Configuration and Hosting' started by grantus, Jun 13, 2014.

  1. grantus

    grantus Active Member

    What would be the redirect to put in my htaccess for my forum move? Right now my forum is in the root (public_html), and I'm moving it to the "forums" folder (public_html/forums).

    I want to make sure all threads are redirect properly.

  2. edan

    edan Member

    Simple redirection should solve the problem, example:

    RedirectMatch 301 /threads/(.*) /forums/threads/$1
  3. grantus

    grantus Active Member

    Ah, thank you!
  4. Adam Howard

    Adam Howard Well-Known Member

    I assume if you were going to move your forum out of /forums/ and into the root, you could simply reverse that.

    RedirectMatch 301 /forums/threads/(.*) /threads/$1
    edan likes this.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    I should point out that redirect will only work for that route (/threads).

    For example, if you were moving from the /community directory to the root, you would use:
    RewriteRule ^community/(.*)?$ /$1 [R=301,L]
    edan, RoldanLT and Adam Howard like this.
  6. RoldanLT

    RoldanLT Well-Known Member

    What if the forum installed on a folder /forums/ then moved to the root folder.
    Not redirecting correctly forum nodes url's :/

Share This Page