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

XF 1.3 Route changer and changing folder directories

Discussion in 'Troubleshooting and Problems' started by AzzidReign, May 16, 2014.

  1. AzzidReign

    AzzidReign Well-Known Member

    Since the dawn of my site, I always had the forums in the "forums" folder. With vb and IPB, I was always able to get a portal page in the root of my domain. But since nothing like that has been created with xf yet, I'm stuck with either having the homepage set to forums/ and then the forums would end up being forums/forums or going with the default being forums/portal and 302'ing our root to the portal page first.

    I'm wondering if, with the route changer, I can move my forums to my root directory and make it so all my URLs stay the same. If so, how should I go about doing it to keep a thread link looking like:
    (note the forums/threads/[...])

    As opposed to:
    (note no forums before /threads/)

    Thank you!

    I think I have it figured out. I want to know if this is correct:

    Are there others I need to add? We don't allow search engines to index members pages so I don't think that will need to be added to this. I just want to make sure this is correct and if there is anything missing.
    Last edited: May 16, 2014
  2. Mike

    Mike XenForo Developer Staff Member

    That's the correct way to do it. Obviously every possible URL could be changed to be totally correct, but it's up to you how far you want to take it.
    AzzidReign likes this.
  3. AzzidReign

    AzzidReign Well-Known Member

    I'm only concerned with indexed URLs. We don't index our rules, help pages, and members pages. I can't think of anything else that I may be missing at this point.
  4. AzzidReign

    AzzidReign Well-Known Member

    @Mike - So before I go through with moving the directory, I had another question. I converted from IPB. So I'm looking at the 301config.php right now. Do I need to change the directory to not include forums?
    $fileDir = '/home/*****/public_html/forums';

    I'm assuming so but didn't know since I plan on using the route filter to recreate our current url "look" so I can have the homepage set to our .com (root).

    Any other files I need to edit before I move? Aside from robots.txt and any caching options in the htaccess.
  5. Mike

    Mike XenForo Developer Staff Member

    That reference should always point to where the physical files are, so if they're being moved up a directory then you would need to change that path.

    The only thing you need to change in a standard XenForo install to move the files is the Board URL option. Other paths are relative by default.
  6. AzzidReign

    AzzidReign Well-Known Member

    Thanks Mike.

    For anyone else looking to do the same. There was 1 route I didn't account for but got it figured out rather quickly as I was moving through all the URL's on the board:
  7. AzzidReign

    AzzidReign Well-Known Member

    So after doing this "successfully", I'm running into unforeseen issues. Right now, Paypal's IPN for my recurring payments can't find the "old" url. For now I've done a 301 redirect to the new one but not sure if that is actually going to hold up with Paypal. Is there a way to put it in the route changer to get the payment_callback.php to show up as /forums/payment_callback.php?
  8. Mike

    Mike XenForo Developer Staff Member

    No, a 301 redirect is the only option for direct file access like that (and should be fine).
    AzzidReign likes this.

Share This Page