1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Any edit to .htaccess breaks Magento Site

Discussion in 'Apache' started by Borduhh, Nov 13, 2015.

  1. #1
    Hi All,
    SEMrush
    This is my current .htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    ###########################################
    ## Deny access to cron.php
        <Files cron.php>
    
    ############################################
    ## uncomment next lines to enable cron access with base HTTP authorization
    ## http://httpd.apache.org/docs/2.2/howto/auth.html
    ##
    ## Warning: .htpasswd file should be placed somewhere not accessible from the web.
    ## This is so that folks cannot download the password file.
    ## For example, if your documents are served out of /usr/local/apache/htdocs
    ## you might want to put the password file(s) in /usr/local/apache/.
    
            #AuthName "Cron auth"
            #AuthUserFile ../.htpasswd
            #AuthType basic
            #Require valid-user
    
    ############################################
    
            Order allow,deny
            Deny from all
    
        </Files>
    
    ###########################################
    
    Code (markup):

    I want to enable a few things such as GZip compression on my files, but everytime I add anything to my .htaccess file, might site returns a internal server error.

    Here is the code I am trying to add:
    ## enable resulting html compression
    
        php_flag zlib.output_compression on
    Code (markup):
    Any ideas on why this keeps happening? Apparently I am just that new to all of this.

    Best Wishes.
     
    Borduhh, Nov 13, 2015 IP
    SEMrush
  2. MyBargainHost

    MyBargainHost Member

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #2
    Not all php implementations support php_flag, how is php running on the server and what webserver is being used (sounds like the system is running PHP in cgi mode)? . Have you tried creating a .user.ini or .ini file in the desired directory?
     
    MyBargainHost, Nov 13, 2015 IP