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

XF 1.2 Route Filters : Changing /forums/ To /community breaks the threads list

Discussion in 'Troubleshooting and Problems' started by TheBigK, Aug 15, 2013.

  1. TheBigK

    TheBigK Well-Known Member

    I followed the Route Filters introduction available here - http://xenforo.com/community/threads/route-filters.47946/ .

    What I want to do:

    [XenForo is installed in the root of the site]
    1. Have my homepage: www.crazyengineers.com as 'Home'. It's controlled by XenPorta. (Successful) . Changed the 'Index Page Route' to /portal.

    2. Have My xenforo forum displayed on http://www.crazyengineers.com/community/ . I achieved this by creating a route filter as follows -
    Find Route: /forums/
    Replace With: /community/

    Now, xenforo does appear in /community as expected. However, opening any forum shows error. That is all the URLs like:

    http://www.crazyengineers.com/forums/computer-science-it-networking.42/
    are changed to
    http://www.crazyengineers.com/computer-science-it-networking.42/
    (forums get stripped out from the URL).

    Obviously, I'm not setting the route filter correctly. Can someone help me fix this?
     
  2. RobParker

    RobParker Well-Known Member

    Just to be clear, have you disabled the route changing stuff in xenporta? You need to let XF handle all the route changes.
     
  3. TheBigK

    TheBigK Well-Known Member

    I think the latest version of xenPorta does not have route changing options. Moreover, the problem I see is clearly with the setup of Route Prefix in xenForo.

    Maybe I need to tell XenForo that it should not strip out /forums/ from the URLs. But change it to /community/
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    The XenForo route filter function does not remove routes, it only changes them.
     
  5. TheBigK

    TheBigK Well-Known Member

    Just checked, the problem persists even with xenPorta disabled.

    Find Route: /forums/
    Replace With: /community/

    Does that work with URLs like:
    http://www.crazyengineers.com/forums/computer-science-it-networking.42/ ?

    Because on my test board, it doesn't. I think I need add something more to 'Replace With': /community/ thing.
     
  6. Mike

    Mike XenForo Developer Staff Member

    Take out the leading slashes.

    Though I'm not sure why that's replacing with nothing...
     
  7. TheBigK

    TheBigK Well-Known Member

    Still not working. It takes out "forums" and replaces it with nothing. As a result, I'm getting
    The requested page could not be found error.
     
  8. TheBigK

    TheBigK Well-Known Member

    It it helps, I've set my Index Page Route To: portal/ . Home Page URL is blank.
     
  9. Mike

    Mike XenForo Developer Staff Member

    If you want to submit a ticket with FTP and admin CP access details, I'll have a look.
     
  10. TheBigK

    TheBigK Well-Known Member

    On it right now.
     
  11. Mike

    Mike XenForo Developer Staff Member

    This was caused by a .htaccess redirect - the route filters were correct and were generating the right URLs.
     
    TheBigK and RobParker like this.

Share This Page