Search code examples
.htaccessurl-rewritingforumexpressionengine

htaccess mod_rewrite Help for Expression Engine Forum Module


I need to write a .htaccess rewrite command to make a certain URL behave like another.

A forum module I have installed over ExpressionEngine will not work unless the forum is situated on the first segment of the URL.

So I need to make: www.example.com/members/forum/

behave like: www.example.com/forum/


Solution

  • Change your Forum URL to /members/forum and run the forum thru regular templates — no mod_rewrite rules needed.

    Follow these detailed instructions:

    1. Create a new template group: members
    2. Within that template group, create a new template: forum
    3. In the forum template, put the following code: {exp:forum}
    4. From the Control Panel, go to Add-Ons > Modules > Discussion Forum > Default Preferences
    5. Configure your Forum Board Preferences to the following:

    Forum Forum Board Short Name: forum
    Forum URL: http://example.com/index.php/members/forum
    Forum Triggering Word: <empty>

    At this point, your forum will then be run inside the regular EE templating engine.

    The forum is then accessed through whichever template you created above — the template name used in place of the "trigger" word:

    http://www.example.com/members/forum/

    Your links will then be written out using the Forum URL specified in the Control Panel.