XF 1.3 Route changer and changing folder directories

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:
Code:
http://www.se7ensins.com/forums/threads/halo-5-guardians-confirmed-for-2015.1137515/
(note the forums/threads/[...])

As opposed to:
Code:
http://www.se7ensins.com/threads/halo-5-guardians-confirmed-for-2015.1137515/
(note no forums before /threads/)
??

Thank you!


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


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:
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.
 
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.
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.
 
@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.
 
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.
 
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:
0V0N9dC.png
 
@Mike
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?
 
Back
Top Bottom