Home Coupon Code Some htaccess fixes if your web site not working properly
Coupon Code - Tech - July 24, 2016

Some htaccess fixes if your web site not working properly

Some .htaccess fixes if your web site not working properly

Here are some .htaccess fixes if your site is not working properly. You just need to put them on the .htaccess file and your site will work properly.

1. Image upload problem giving HTTP error so use below code on .htaccess file.

            <Ifmodule mod_security.c="">
              SecFilterEngine Off
              SecFilterScanPOST Off

2. Site is slow or you want Gzip compression

          <IfModule mod_gzip.c>
            mod_gzip_on Yes
            mod_gzip_dechunk Yes
            mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
            mod_gzip_item_include handler ^cgi-script$
            mod_gzip_item_include mime ^text/.*
            mod_gzip_item_include mime ^application/x-javascript.*
            mod_gzip_item_exclude mime ^image/.*
            mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

3. You need to Activate Caching without using any plugins

          ## EXPIRES CACHING ##
          <IfModule mod_expires.c>
           ExpiresActive On
           ExpiresByType image/jpg "access 1 year"
           ExpiresByType image/jpeg "access 1 year"
           ExpiresByType image/gif "access 1 year"
           ExpiresByType image/png "access 1 year"
           ExpiresByType text/css "access 1 month"
           ExpiresByType text/html "access 1 month"
           ExpiresByType application/pdf "access 1 month"
           ExpiresByType text/x-javascript "access 1 month"
           ExpiresByType application/x-shockwave-flash "access 1 month"
           ExpiresByType image/x-icon "access 1 year"
           ExpiresDefault "access 1 month"
        ## EXPIRES CACHING ##

       <FilesMatch "\.(js|css|html|htm|php|xml)$">
       SetOutputFilter DEFLATE


4. Your Website script Maximum Execution Time Exceeded

       <IfModule mod_php5.c>
        php_value max_execution_time 300


5. You want to increase upload file size ?

          php_value upload_max_filesize 128M
          php_value post_max_size 1028M
          php_value max_execution_time 300
          php_value max_input_time 300


6. Icons are not displaying correctly

         <FilesMatch ".(ttf|otf|woff)$">
             Header set Access-Control-Allow-Origin "*"

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also

The Speed of Nine Planet

The speed of Sun : Astronomically the Sun is fixed and it is the planets which are moving …