XF 2.2 Route filter for root domain


Active member
Is there any way to create a route filter for the root domain so that the forums tab can be given it's own pseudo path? I don't want the entire forum in a subdirectory.

Currently when arriving at the domain, the address bar only shows the root domain name, and the Forum tab and related breadcrumbs also only show the root domain.com URL. Instead, I'd like those to be domain.com/forums/

I can achieve this with htaccess, but alternatively when creating a route filter I can't specify Find Route to be blank or only a slash.
You can change the index route under the basic options in your control panel. By setting it to some other route, the default forum page will be available under the forums/ route instead. You may then set the home page URL to your domain root and set the root breadcrumb to 'Home' to achieve what you wish.
Thanks. Do you have a suggestion for another route that will still keep the Forum tab as the default landing page? I've tried just putting a slash in there and while the Forums tab URL will then have forums/ included, visiting the root domain causes an Oops! error.
Ah, I presumed there was another page you wanted to use as the index instead. Setting anything as the index route will make it available at that URL instead of its usual route, so I don't think there's a good way to achieve what you want out of the box. Personally, I'm not sure I would recommend having your domain landing page be a redirect to another page, but if that's really what you want it would likely require configuration at the server level.
No worries. There's no other pages, the forum is installed in the root directory.

I wanted to give the Forums tab its own path forums/ consistent with the other tab paths (whats-new/, members/) rather than just the plain domain name.

I also wanted visitors to be redirected to that forums/ path when they land on the bare domain, so they'd be shown the Forums tab contents as the home page with the URL domain.com/forums/ displayed in the address bar.

I have got it working that way with the help of htaccess but I would have preferred to keep the configuration all within the XF options if possible.
Top Bottom