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

XF 1.5 Route filter?

Discussion in 'XenForo Questions and Support' started by click here, Sep 1, 2015.

  1. click here

    click here Active Member

    Okay, a little confused on the route filter deal but here is my situation.

    Currently my VB3.8 site sits at
    http://example.com/forums/showthread.php?t=1234

    I would like to simply re-name the old "forums" directory to lets say "oldforums"

    My current XF1.5 forum ready to go live is in a directory called "community" like below.
    http://example.com/community/forums/threads/example.1/

    I thought I could then simply rename the XF directory from "community" to "forums" and I would be good to go but noticed I would then have http://example.com/forums/forums/threads/example.1/ which I would not want.

    What is the best way to proceed so I end up with "http://example.com/forums/threads/example.1/" and not an extra "forums" in there?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    Rename your VB forums directory to oldforums.
    Move the forums directory inside community up one level.

    You don't need route filters for this.
     
  3. click here

    click here Active Member

    I'm a little confused... I don't have a forums directory inside the community directory, the XF-forum is located at "http://example.com/community".
    Are you saying to re-name the "community" directory to forums and then move it to the root directory?
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    If you have a URL like this:
    http://example.com/community/forums/threads/example.1/

    Then that suggests you have installed XF in the community/forums directory.

    If you have installed XF in the community directory, a threads URL would look like:
    http://example.com/community/threads/example.1/

    Again in the community directory, the URL for a specific forum would look like:
    http://example.com/community/forums/forum.1/
     
  5. click here

    click here Active Member

    Hmmm, the only directory's that I have in the "community" directory are:
    community/data
    community/install
    community/internal_data
    community/js
    community/library
    community/styles

    There is no "forums" directory inside of the "community" directory.
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    Then is your example in your original post wrong? What does a threads URL look like?
     
  7. click here

    click here Active Member

  8. Brogan

    Brogan XenForo Moderator Staff Member

    As Chris said, move the installation to the root to get rid of the /forums/.
     
  9. click here

    click here Active Member

    So there isn't any way to keep the forums at "example.com/forums" AND get rid of the other /forums/?
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    No.

    Why do you want to keep it in that directory if you then want to remove it from the URL?
     
  11. Chris D

    Chris D XenForo Developer Staff Member

    You could rename the second forums with something else using route filters. Though you can't get rid of it completely - otherwise how would you access an actual forum list URL?
     
  12. click here

    click here Active Member

    The URL simply looks cleaner without the extra forums and I have other stuff at the root level so it keeps that area un-cluttered. Plus VB3.8 didn't have the extra forums. :confused:
     
  13. click here

    click here Active Member

    I might rename the 2nd forums to my main keyword or something... if I did that would it mess up the redirect script etc. that I need to run still?
     
  14. Chris D

    Chris D XenForo Developer Staff Member

    In VB it would have been something like /forums/showforum.php

    You could use route filters to change forums to showforum if that seems more acceptable.
     
  15. click here

    click here Active Member

    Okay, thanks guys... I may slap my main keyword in there instead.
     

Share This Page