Installing ExpressionEngine by default assumes that the forum will always be located at the URL:
http://example.com/index.php/forums
Although you can freely change the forum URL, the discussion forum module assumes that the forum will be the first URL segmentation variable , {segment_1}
URI.
This information is not as widely documented as it should be, and gives a lot of confusion for people who want to run their forum on a different URL or subdomain .
To allow the discussion forum to work as a different URL; on the second segment {segment_2}
- you need to configure EE to start the forum using regular templates *.
In your example, you need:
- Create a new template group:
students
- In this template group, create a new template:
forum
- In the
forum
template, enter the following code: {exp:forum}
- From the control panel, go to add-ons> Modules> Discussion forum> Default settings
- Configure your Forum forum settings for the following:
Bulletin Board: Student Forum
Forum Forum Board Short name: forum
Forum URL: http://example.com/index.php/students/forum
User-run word: <empty>
At this point, your forum will launch inside the regular EE modeling engine. Then the forum opens through any template that you created above β the name of the template is used instead of the word βtriggerβ mentioned earlier:
http://example.com/index.php/students/forum
The downside of this approach is that it adds extra processing overhead, so it is not recommended if users do not need this feature. Since the forum cannot be cached, on very busy sites this can create some unwanted load on the server.
Do not cache the template created for the forum. If you do this, your forum will not behave dynamically.
source share