We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11030
    • 21 Posts
    As the title suggests, i’m having trouble changing the ht.access to .htaccess for friendly urls to work.

    I’m not sure what i’m doing incorrectly, but for some reason, when i make the change, i get the following error:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    am i missing anything from my .htaccess file for it to work correctly?, it currently looks like:

    # For full documentation and other suggested options, please see
    # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
    # including for unexpected logouts in multi-server/cloud environments

    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /

    # Fix Apache internal dummy connections from breaking [(site_url)] cache
    RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
    RewriteRule .* - [F,L]

    # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} !^example\.com [NC]
    #RewriteRule (.*) http://www.example.com/$1 [R=301,L]

    # Exclude /assets and /manager directories from rewrite rules
    RewriteRule ^(manager|assets) - [L]

    # For Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]

    # Reduce server overhead by enabling output compression if supported.
    php_flag zlib.output_compression On
    php_value zlib.output_compression_level 5

    So, am i missing anything or is this an issue i need to take up with my web host?.

    Thanks in advance.
    • If your MODx installation is in a subdirctory, and its parent has a .htaccess with RewriteEngine On already it will cause this error.

      It is also possible that your server doesn’t have .htaccess enabled.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 36592
        • 970 Posts
        Or remove this line.
        Options +FollowSymlinks

        • Actually I suspect the problem is even simplier... If your on shared hosting most of them don’t offer gzip support so you need to disable it...

          Comment out these two lines:
          php_flag zlib.output_compression On
          php_value zlib.output_compression_level 5

          (Add a # in front to comment out)
            Patrick | Server Wrangler
            About Me: Website | TweetsMODX Hosting
            • 11030
            • 21 Posts
            I installed Modx CMS in the main directory, and the default .htaccess came with those lines commented and it didn’t work.

            Now i know this might sound strange but for some reason, the .htaccess file has been deleted and the website works fine without it and friendly URLs are working perfectly. Will this be SEO or do i need the .htaccess file?

            I’m quite confussed as to how this is working without the file, i’m guessing the web host support staff deleted the .htaccess, but i’m suprised the website is working without it.... any suggestions or clues as to how this happened? or happening even?
            • Are you sure that it’s been deleted? Normally files beginning with a . are not displayed; you have to configure your ftp client to show hidden or system files.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 3749
                • 24,544 Posts
                It must still be there because the FURLs can’t work without it.

                My guess is that commenting out the two php directives fixed things and you didn’t see it until your browser cache cleared. smiley
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 3604
                  • 13 Posts
                  Quote from: sottwell at Aug 10, 2009, 08:57 PM

                  Are you sure that it’s been deleted? Normally files beginning with a . are not displayed; you have to configure your ftp client to show hidden or system files.

                  This is correct, and its actually what I was thinking your problem was before reading the thread.