We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3624
    • 7 Posts
    Hi all,

    I have switched hosts and the new server seems to have problems with .htaccess, being a weekend and all I can’t seem to get this clarified. Basically, if I have my .htacess uploaded I get the following error message:

    Internal Server Error, this is an error with your script, check your error log for more information.

    However, I can remove it and there error goes but I obviously can’t have SEF URLs enabled.

    Short term, is there any way to have SEF enabled without having .htacess

    Thanks
      • 25663 MODX Staff
      • 12,272 Posts
      No.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 3624
        • 7 Posts
        Thats to the point.
          • 18397
          • 3,250 Posts
          You might try removing the zlib compression lines as some hosts have trouble with them.
            • 3624
            • 7 Posts
            Hi Mark,

            Already commented out, here is my .htaccess file:

            # MODx supports Friendly URLs via this .htaccess file. You must serve web
            # pages via Apache with mod_rewrite to use this functionality, and you must
            # change the file name from ht.access to .htaccess.
            #
            # Make sure RewriteBase points to the directory where you installed MODx.
            # E.g., "/modx" if your installation is in a "modx" subdirectory.
            #
            # You may choose to make your URLs non-case-sensitive by adding a NC directive
            # to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
            
            RewriteEngine On
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
            
            
            
            # Make sure .htc files are served with the proper MIME type, which is critical # for XP SP2. Un-comment if your host allows htaccess MIME type overrides.
            
            #AddType text/x-component .htc
            
            
            
            # If your server is not already configured as such, the following directive
            # should be uncommented in order to set PHP's register_globals option to OFF.
            # This closes a major security hole that is abused by most XSS (cross-site
            # scripting) attacks. For more information: http://php.net/register_globals
            #
            # To verify that this option has been set to OFF, open the Manager and choose
            # Reports -> System Info and then click the phpinfo() link. Do a Find on Page
            # for "register_globals". The Local Value should be OFF. If the Master Value
            # is OFF then you do not need this directive here.
            #
            # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
            #
            # Your server does not allow PHP directives to be set via .htaccess. In that
            # case you must make this change in your php.ini file instead. If you are
            # using a commercial web host, contact the administrators for assistance in
            # doing this. Not all servers allow local php.ini files, and they should
            # include all PHP configurations (not just this one), or you will effectively
            # reset everything to PHP defaults. Consult www.php.net for more detailed
            # information about setting PHP directives.
            
            #php_flag register_globals Off
            
            
            
            # For servers that support output compression, you should pick up a bit of
            # speed but uncommenting the following lines.
            
            #php_flag zlib.output_compression On
            #php_value zlib.output_compression_level 5
            
            
            
            # The following directives stop screen flicker in IE on CSS rollovers. If
            # needed, un-comment the following rules. When they're in place, you may have
            # to do a force-refresh in order to see changes in your designs.
            
            #ExpiresActive On
            #ExpiresByType image/gif A2592000
            #ExpiresByType image/jpeg A2592000
            #ExpiresByType image/png A2592000
            #BrowserMatch "MSIE" brokenvary=1
            #BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
            #BrowserMatch "Opera" !brokenvary
            #SetEnvIf brokenvary 1 force-no-vary
              • 32982
              • 674 Posts
              it ssems your server hasent modrebrite enabled
              tell to us
                Jabiertxof (formerly XYZVISUAL)
                My bussines: http://marker.es
                https://www.youtube.com/user/jabiertxof/videos
                • 24495
                • 407 Posts
                Hi all,
                I changed from an Apache1/PHP4 to an Apache/2.0.54 (Debian GNU/Linux) PHP/5.2.1 with Suhosin-Patch DAV/2.

                modx 0.9.5 with TinyMCE 2.1.0 and Ditto 2.

                After changing FURL doesn’t work (before does w/o problems). mod_rewrite is loaded, AllowOverride All is set.

                Use friendly URL : Yes
                Prefix for friendly URL : Blank
                Suffix for friendly URL : .html
                Use friendly Aliases : Yes
                Use friendly Aliases Path : Yes
                Allow Duplicate Alias : Yes
                Automatically generate Aliases : No

                htaccess is the standard file delivered with modx and YES it’s renamed to correct file name (see above: before changing it worked).

                The hosts support said that the syntax of the htaccess isn’t correct. I should check it. Should be a problem with Apache 2.

                What happens: home page loads correct. I see in browser’s status line the FURL to a sub-page with full path www.domain.de/folder1/folder2/page-alias.html
                When I click the link the URL is correct in address field but a 403 error occurs.

                Any ideas? Thx.

                EDIT: I checked the error log. There was a line
                ... Permission denied: cannot read directory for multi: ...

                I set this line at first in htaccess and now it works!
                Options +ExecCGI +FollowSymLinks -Indexes -MultiViews