www.webdeveloper.com
Results 1 to 5 of 5

Thread: .htaccess conflict

  1. #1
    Join Date
    May 2009
    Posts
    3

    .htaccess conflict

    Hi there.

    Forgive me for making my first post a request for help (and I hope this is in the right forum). With that said, I'd be hugely grateful for any advice.

    My .htaccess file is causing a conflict which causes an internal server error and prevents the site from displaying. It was fine until yesterday, and between now and then the only site change was a server-side software update by my hosting company, Rochen.

    Now, enabling (i.e. correctly naming) my .htaccess file causes the server error. Disabling (renaming) it causes the site to run perfectly, but without SEF URLS (which resuire mod_rewrite and a functioning .htaccess file).

    I believe one of the server changes was an upgrade from Apache 2.0xxx to the Apache 2.2xxx tree, and a bit of Google searching suggests mod_rewrite and Apache 2.2 have some conflicts. But I can't work out how to resolve it, if this is the case.

    For reference, the site is http://www.rollzero.com

    And the .htaccess file, which is currently renamed, can be seen here: http://www.rollzero.com/htaccessp

    For reference, the line "Options +FollowSymLinks" was not previously commented out. I commented it out to see if that was causing the conflict, but the internal server error still occurred.

    Thank you very much in advance to anybody who may be able to help,
    Pix.
    Last edited by Pixelsmith; 05-07-2009 at 02:56 PM.

  2. #2
    Join Date
    Jun 2006
    Location
    England, UK
    Posts
    71
    Contact your host, they will be able to conclude the origin of the error and hopefully fix it.

  3. #3
    Join Date
    May 2009
    Posts
    3
    Thanks for the advice - I have contacted them, but they wont look into it any further. Their suggestion to troubleshoot the changes to the non-standard joomla .htaccess file one by one.

  4. #4
    Join Date
    May 2009
    Posts
    3
    Update: I've narrowed it down and discovered that this part of my .htaccess file is causing the 500 Internal Server Error. Does anybody have any idea of why this might be?

    Code:
    ########################################
    ## Compress these file-types before sending
    ########################################
    
    <IfModule>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript
    </IfModule>
    
    ########################################
    ## Sent default expire headers
    ########################################
    
    <IfModule>
            ExpiresActive On
            ExpiresDefault "now plus 1 months"
            ExpiresByType text/html "now plus 10 mins"
    </IfModule>
    Again, I am wondering if this may be related to the upgrade to apache 2.2
    Last edited by Pixelsmith; 05-08-2009 at 02:08 PM.

  5. #5
    Join Date
    Sep 2004
    Posts
    398
    <IfModule> must have a "test" (the module).
    Quote Originally Posted by http://httpd.apache.org/docs/2.2/mod/core.html#ifmodule
    Syntax: <IfModule [!]module-file|module-identifier> ... </IfModule>
    ...
    The <IfModule test>...</IfModule> section is used to mark directives that are conditional on the presence of a specific module. The directives within an <IfModule> section are only processed if the test is true. If test is false, everything between the start and end markers is ignored.

    The test in the <IfModule> section directive can be one of two forms:

    * module
    * !module

    In the former case, the directives between the start and end markers are only processed if the module named module is included in Apache -- either compiled in or dynamically loaded using LoadModule. The second format reverses the test, and only processes the directives if module is not included.

    The module argument can be either the module identifier or the file name of the module, at the time it was compiled. For example, rewrite_module is the identifier and mod_rewrite.c is the file name. If a module consists of several source files, use the name of the file containing the string STANDARD20_MODULE_STUFF.
    I'd guess you want mod_deflate and mod_expires respectively.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles