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

    I have just tried to change my ht.access file and ended up with a 500 internal error. I changed my ht.access to the following:

    # For full documentation and other suggested options, please see
    # http://rtfm.modx.com/evolution/1.0/administration/friendly-url-solutions
    # including for unexpected logouts in multi-server/cloud environments
    # and especially for the first three commented out rules
    
    #php_flag register_globals Off
    AddDefaultCharset utf-8
    #php_value date.timezone Europe/Moscow
    
    #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} !^www\. [NC]
    #RewriteCond %{HTTP_HOST} (.+)$
    #RewriteRule ^(.*)$ http://www.%1/$1 [R=permanent,L] . 
    
    # without www
    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} !^example\.com [NC]
    #RewriteRule (.*) http://www.example.com/$1 [R=301,L]
    
    # without www  all domian
    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
    #RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    
    # Exclude /assets and /manager directories and images from rewrite rules
    RewriteRule ^(manager|assets)/.*$ - [L]
    RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]
    
    # For Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    
    # Reduce server overhead by enabling output compression if supported.
    php_flag zlib.output_compression On
    php_value zlib.output_compression_level 5


    Also I read about Script Kiddies and global registers. I noticed the line in my ht.access #php_flag register_globals Off, do I need to uncomment this? I am using Evo 1.0.15

    Regards,
    SB

    This question has been answered by multiple community members. See the first response.

    [ed. note: distant_smile last edited this post 9 years, 2 months ago.]
      www.PawsForWildlife.co.uk
      www.Borntobrick.co.uk
      • 7527
      • 437 Posts
      Ok I managed to change my .htaccess to ht.access and I have my homepage back! But when I click a link it gives a blank page. I have obviously missed something out. Can anyone spot my mistake please?

      Regards,
      SB
        www.PawsForWildlife.co.uk
        www.Borntobrick.co.uk
      • discuss.answer
        • 13226
        • 953 Posts
        You are hosted on a 1&1 server, by rights all you need in the .htaccess file is the following:

        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]
        
        # Exclude /assets and /manager directories and images from rewrite rules
        RewriteRule ^(manager|assets)/.*$ - [L]
        RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]
        
        # For Friendly URLs
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
          • 7527
          • 437 Posts
          Thanks, do I need to be wary of the global registers on/off issue?
            www.PawsForWildlife.co.uk
            www.Borntobrick.co.uk
            • 13226
            • 953 Posts
            No - as stated above, thats all you need in the .htaccess

            I just copied that from a 1.0.15 on a 1&1 server.
              • 7527
              • 437 Posts
              Sorry 1 quick questions:

              1. The page ID still shows in the title and so does the 'breadcrumb trail' (as highlighted in bold) Is there a quick way to stop this happening?

              http://www.borntobrick.co.uk/11/complete_minifigures/marvel_minifigures.html

              Regards,
              SB
                www.PawsForWildlife.co.uk
                www.Borntobrick.co.uk
                • 13226
                • 953 Posts
                If you don't provide an "Alias" the url automatically uses the ID
                  • 7527
                  • 437 Posts
                  The page in the example has an url alias of 'marvel_minifigures'. I would like the address to read :

                  http://www.borntobrick.co.uk/marvel_minifigures.html

                  I remember when I did my first website with Evo I had a similar problem? Maybe something to do with the template setup?
                  SB
                    www.PawsForWildlife.co.uk
                    www.Borntobrick.co.uk
                    • 7527
                    • 437 Posts
                    Ok I just realised my mistake. The '11' is gone now I would just like to remove the breadcrumb trail if possible
                    Regards,
                    SB
                      www.PawsForWildlife.co.uk
                      www.Borntobrick.co.uk
                    • discuss.answer
                      • 13226
                      • 953 Posts
                      Try this:

                      Manager => Tools => Configuration => Friendly URLs => Use Friendly URL alias path = NO