ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Discussion Forum (3.1.6) doesn’t appear; using an .htaccess

November 19, 2011 4:35am

Subscribe [4]
  • #1 / Nov 19, 2011 4:35am

    bmewhinney

    30 posts

    This question may be related to a resolved thread.

    - - - - - - - - - - -

    Howdy! I am rebuilding an EE install, with good results so far except a stubbornly shy Forum.

    My Discussion Forum module (3.1.6) functions within the Control Panel but doesn’t appear via HTTP.

    Details:
    EE 2.3.1 and domain are working fine; no MSM installed.
    —The “admin.php” file was renamed, with configs tweaked to match.
    —The “system” folder was renamed and the required “$system_path” references updated.
    —The renamed “system” folder resides within the domain’s root folder, not above.
    —The index file field in config is empty, due to .htaccess feature.
    —I am using an .htaccess file (copied from EE docs) to hide “index.php” in URLs.
    —The Forum module is installed okay; a Forum board was created and updated, along with a category and forum.
    —Forum Board short name and triggering word are the same, and neither uses the forum’s template/theme name.
    —The Forum’s selected theme is a renamed CLONE of the “Grey” forum theme, but with custom logo.

    I will nurse an Irish Coffee or two while awaiting lifeboat. Thanks! :coolsmile:

  • #2 / Nov 19, 2011 4:59am

    bmewhinney

    30 posts

    Quick update….

    I should mention that the Mac OS X Server (UNIX/Apache) “rewrite_module” is activated; the domain URL works without “index.php” included.

    On a hunch, I tried http://www.mydomain.net/index.php/forumname and it works. In Forum Board Preferences > Forum Management > Forum URL, I had entered and updated the full http://www.mydomain.net/index.php URL (with “index.php” inserted).

    But I don’t want “index.php” inserted in the URL!  :coolmad:  ....and I could learn to live with it if I can’t get the .htaccess to work right.

  • #3 / Nov 19, 2011 5:55am

    bmewhinney

    30 posts

    Yet another quick update (it just keeps getting better)....

    I realized that the Server Admin application which configures Mac OS X Server is set to load the domain (which contains the EE system) if it finds either an “index.php” or “index.html” file in the root domain folder; the latter file was removed from the root domain folder, while the “index.php” file remains. So the fact that the domain loads without showing “index.php” in the URL may not be due to the .htaccess file?

    Another clue…. Originally I had only an EE “site” template group with the single “index” template for my experimental home page; that’s not really an adequate test of the .htaccess function. So I added another test template to the “site” group and tried this: http://www.mydomain.net/index.php/site/test_page — a URL which loads just fine. Sigh.

    Now mixing the second Irish coffee.  😝

    Testing, testing….
    [11/20/11: as described in http://ellislab.com/expressionengine/user-guide/general/remove_index.php.html, I added “?” after “RewriteRule ^(.*)$ /index.php” to force query strings]
    [11/22/11: as confirmed by Dan below, the “?” made no difference under all conditions]

  • #4 / Nov 21, 2011 1:26pm

    Dan Decker

    7338 posts

    Hi bmewhinney,

    Ok, let’s see if we can get you squared away on this. I know from personal experience that .htaccess on Mac OS X Server doesn’t require the use of the “?” in the rewrite rule. So first, let’s get your .htaccess back to the default reflected in the User Guide. Got that all set? Great!

    Now, on my local install with Discussion Forum, I have my forum trigger word set to “forum” and I am removing index.php. My Forum Board Preferences > Forum Management > Forum URL is set to:

    <a href="http://engine.dev/forum/">http://engine.dev/forum/</a>

    If I visit that URL, I am greeted with my forum.

    If you adjust your settings to be similar to what I have described. are you able to reach your forums as desired?

    Thanks!

  • #5 / Nov 22, 2011 1:21am

    bmewhinney

    30 posts

    Hey, Dan. We may be living in realms governed by different laws of PHP, or HTML, or even Physics.  :ahhh:

    TEST SETUP #1….
    —The .htaccess reverted (minus the “?”) and saved back to match code in http://ellislab.com/expressionengine/user-guide/general/remove_index.php.html;
    —EE General Configuration updated with “Name of your site’s index page” field as “index.php”;
    —Forum Board Preferences updated with both Forum Board Short Name and Forum Triggering Word as “forumname”;
    —Forum URL in Forum Board Preferences updated as http://www.mydomain.net/index.php/forumname.
    RESULT = The “index.php” appears in all forum top-menu links (Your Public Profile etc) including the main Forum Home link in breadcrumbs and the top-left logo image (with link “{path:forum_home}”). Link http://www.mydomain.net/index.php/forumname works.
    —TEST TEMPLATE http://www.mydomain.net/index.php/site/test_page works (with “index.php” included).

    TEST SETUP #2….
    —The .htaccess reverted (minus the “?”) and saved back to match code in http://ellislab.com/expressionengine/user-guide/general/remove_index.php.html;
    —EE General Configuration updated with “Name of your site’s index page” field EMPTY;
    —Forum Board Preferences updated with both Forum Board Short Name and Forum Triggering Word as “forumname”;
    —Forum URL in Forum Board Preferences updated as http://www.mydomain.net/forumname (no “index.php”).
    RESULT = The “index.php” does not appear in all forum top-menu links (Your Public Profile etc) including the main Forum Home link in breadcrumbs and the top-left logo image (with link “{path:forum_home}”). BUT FORUM LINKS DON’T WORK. Link http://www.mydomain.net/index.php/forumname works, but link http://www.mydomain.net/forumname (without “index.php”) DOES NOT work.
    —TEST TEMPLATE http://www.mydomain.net/index.php/site/test_page works with “index.php” included, but mydomain.net/site/test_page does not work.

    I had a VW Bug once that acted like this.

    Am I misusing the .htaccess?  Thanks mucho!

  • #6 / Nov 23, 2011 10:38am

    Kevin Smith

    4784 posts

    Hi bmewhinney,

    Ok, well this might not sound like good news, but at least we know that the site is behaving consistently. The whole site works when including index.php in the URLs, and none of it works without index.php in the urls. So from that, we know that the issue isn’t with the Forum module. It’s likely more specifically related to the server configuration.

    The code you’re using in your .htaccess file will work exactly as expected as long as you have .htaccess support enabled on your server. I suspect that you server isn’t set up to respect .htaccess rules, or more speficially, mod_rewrite rules in .htaccess. I’m not an expert on server management, so you may want to do some Googling to find out how to enable .htaccess on Mac OS X Server.

  • #7 / Nov 23, 2011 3:20pm

    bmewhinney

    30 posts

    Yo, Kevin, thanks. On my server, “rewrite_module” is already activated via Server Admin, and the server itself (not just the Web functions) was restarted.

    There is some possibility that I should also dig into the server’s “httpd.conf” file, but the question then is did Dan Decker need to diddle the httpd.conf file to help his Mac OS X Server and its rewrite_module? And if not, why not? See these references.
    BTW, it wouldn’t kill me to live with “index.php” URLs. After all, the purpose of this thrash was to make the Forum module work, which it now does. It’s just the fickleness of it all.  💋

  • #8 / Nov 23, 2011 7:22pm

    Kevin Smith

    4784 posts

    If I’m not mistaken, I did have to modify httpd.conf to allow me to override default server settings with an .htaccess file, but again, I’m not using Mac OS X Server, just the standard issue version of Lion. Your mileage may vary.

  • #9 / Nov 23, 2011 10:15pm

    bmewhinney

    30 posts

    Thanks, Kevin! When the Turkey Buzz has subsided, I will pursue this. Note that your experience of Mac OS X and “.htaccess” differs from Dan Decker’s a little, mostly due to the changing landscape of client, server, and version-number configurations. Apple has lately been updating how its Server software manages “httpd.conf” and “.htaccess”.

    Look for “httpd.conf” and “.htaccess” together in the https://discussions.apple.com/ support-forum search.
    :wow: —> Especially see https://discussions.apple.com/message/8350511 which mentions the “Allow All Overrides” on a per site basis in Server Admin (Mac OS X Server 10.5.4); I will test this option carefully.

    Again, more to investigate after I get that damn Turkey off my roof.

  • #10 / Nov 24, 2011 1:56am

    Dan Decker

    7338 posts

    Hi bmewhinney,

    I have been a Mac OS X Server Admin in a previous life, and there is a checkbox for “Allow All Overrides” that has to be enabled for .htaccess to be honored, even if mod_rewrite is enabled in the modules. At least I know this to be the case on 10.5 and 10.6 I should have mentioned that in the beginning 😉 All the same, you should have good luck once you check that box!

    Thanks!

  • #11 / Nov 25, 2011 3:07am

    bmewhinney

    30 posts

    Dan & Kevin:
    We have liftoff!
    I checked “Allow All Overrides” (in Mac OS X Server Admin) and used the .htaccess file (exactly as coded in the EE documentation), then restarted the Server. Both the Forum and the main test site now work fine, none of the links show or need “index.php”, and I ate the Turkey — most of it, anyway. Thanks!
    —> SUGGESTION: The EE documentation should mention how potential server configurations (such as on Mac OS X Server) could hinder .htaccess or other custom settings. I know, that sort of platform-specific counsel is the sysadmin’s and platform developer’s turf, but think of how often EE has to lift Windows servers up to reach the water-fountain….  :cheese:

  • #12 / Nov 25, 2011 4:22am

    John Henry Donovan

    12339 posts

    Hi bmewhinney,

    It is only recently that we are supporting the removal of index.php via a htaccess. I believe the plan is at some stage to explore the idea of adding specific notes on different servers or hosting but is a difficult one to manage in terms of its vastness of different setups.

    Glad you are up and running again though. Feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases