Leverage browser caching Using .htaccess










-1















I have issue for leverage browser caching for svg images in wordpress and i have tried leverage browser caching and also add following code in .htaccess



<ifModule mod_headers.c>
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$">
Header set Cache-Control "max-age=84600, public"
</filesMatch>


Still it show same error on GTmetrix.



I searched over google for leverage browser cachin and tried different ways but not resolved the issue.



Below is .htaccess what are the things wrong with it as gzip and leverage browser caching has still error though i added code in .htaccess



SetEnv PHPRC /home/excell21/public_html/php.ini

# Use PHPedge as default
#AddHandler application/x-httpd-php-edge .php
#<IfModule mod_suphp.c>
# suPHP_ConfigPath /opt/phpedge/lib
#</IfModule>

## EXPIRES CACHING ##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
</IfModule>

<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.*
</IfModule>

<ifModule mod_headers.c>
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$">
Header set Cache-Control "max-age=84600, public"
</filesMatch>

<filesmatch ".(html|htm)$">
Header set Cache-Control "max-age=7200, private, must-revalidate"
</filesmatch>

<filesmatch ".(pdf)$">
Header set Cache-Control "max-age=86400, public"
</filesmatch>

<filesmatch ".(js)$">
Header set Cache-Control "max-age=2678400, private"
</filesmatch>

</ifModule>
<ifModule mod_headers.c>
Header unset Vary
Header set Vary "Accept-Encoding"
</ifModule>


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



# 6G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %QUERY_STRING (eval() [NC,OR]
RewriteCond %QUERY_STRING (127.0.0.1) [NC,OR]
RewriteCond %QUERY_STRING ([a-z0-9]2000) [NC,OR]
RewriteCond %QUERY_STRING (javascript:)(.*)(;) [NC,OR]
RewriteCond %QUERY_STRING (base64_encode)(.*)(() [NC,OR]
RewriteCond %QUERY_STRING (GLOBALS|REQUEST)(=|[|%) [NC,OR]
RewriteCond %QUERY_STRING (<|%3C)(.*)script(.*)(>|%3) [NC,OR]
RewriteCond %QUERY_STRING (\|...|../|~|`|<|>||) [NC,OR]
RewriteCond %QUERY_STRING (boot.ini|etc/passwd|self/environ) [NC,OR]
RewriteCond %QUERY_STRING (thumbs?(_editor|open)?|tim(thumb)?).php [NC,OR]
RewriteCond %QUERY_STRING ('|")(.*)(drop|insert|md5|select|union) [NC]
RewriteRule .* - [F]
</IfModule>



# TN - BEGIN Turn ETags Off
FileETag None
# TN - END Turn ETags Off



# 6G:[REQUEST METHOD]
<IfModule mod_rewrite.c>
RewriteCond %REQUEST_METHOD ^(connect|debug|delete|move|put|trace|track) [NC]
RewriteRule .* - [F]
</IfModule>

# 6G:[REQUEST STRINGS]

<IfModule mod_alias.c>
RedirectMatch 403 (?i)([a-z0-9]2000,)
RedirectMatch 403 (?i)(https?|ftp|php):/
RedirectMatch 403 (?i)(base64_encode)(.*)(()
RedirectMatch 403 (?i)(=\'|=\%27|/\'/?).
RedirectMatch 403 (?i)/($(&)?|*|"|.|,|&|&amp;?)/?$
RedirectMatch 403 (?i)(0|(/(|...|+++|\"\")
RedirectMatch 403 (?i)(~|`|<|>|:|;|,|%|\|s||[|]||)
RedirectMatch 403 (?i)/(=|$&|_mm|cgi-|etc/passwd|muieblack)
RedirectMatch 403 (?i)(&pws=0|_vti_|(null)|$itemURL|echo(.*)kae|etc/passwd|eval(|self/environ)
RedirectMatch 403 (?i).(aspx?|bash|bak?|cfg|cgi|dll|exe|git|hg|ini|jsp|log|mdb|out|sql|svn|swp|tar|rar|rdf)$
RedirectMatch 403 (?i)/(^$|(wp-)?config|mobiquo|phpinfo|shell|sqlpatch|thumb|thumb_editor|thumbopen|timthumb|webshell).php
</IfModule>

# 6G:[USER AGENTS]

SetEnvIfNoCase User-Agent ([a-z0-9]2000) bad_bot
SetEnvIfNoCase User-Agent (archive.org|binlar|casper|checkpriv|choppy|clshttp|cmsworld|diavol|dotbot|extract|feedfinder|flicky|g00g1e|harvest|heritrix|httrack|kmccrew|loader|miner|nikto|nutch|planetwork|postrank|purebot|pycurl|python|seekerspider|siclab|skygrid|sqlmap|sucker|turnit|vikspider|winhttp|xxxyy|youda|zmeu|zune) bad_bot
Order Allow,Deny
Allow from All
Deny from env=bad_bot

# 6G:[BAD IPS]
Order Allow,Deny
Allow from All
# uncomment/edit/repeat next line to block IPs

AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html

<FilesMatch ".(js|css|txt|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>

RewriteEngine On
RewriteCond %HTTP_USER_AGENT ^BlackWidow [OR]
RewriteCond %HTTP_USER_AGENT ^Bot mailto:craftbot@yahoo.com [OR]
RewriteCond %HTTP_USER_AGENT ^ChinaClaw [OR]
RewriteCond %HTTP_USER_AGENT ^Custo [OR]
RewriteCond %HTTP_USER_AGENT ^DISCo [OR]
RewriteCond %HTTP_USER_AGENT ^Download Demon [OR]
RewriteCond %HTTP_USER_AGENT ^eCatch [OR]
RewriteCond %HTTP_USER_AGENT ^EirGrabber [OR]
RewriteCond %HTTP_USER_AGENT ^EmailSiphon [OR]
RewriteCond %HTTP_USER_AGENT ^EmailWolf [OR]
RewriteCond %HTTP_USER_AGENT ^Express WebPictures [OR]
RewriteCond %HTTP_USER_AGENT ^ExtractorPro [OR]
RewriteCond %HTTP_USER_AGENT ^EyeNetIE [OR]
RewriteCond %HTTP_USER_AGENT ^FlashGet [OR]
RewriteCond %HTTP_USER_AGENT ^GetRight [OR]
RewriteCond %HTTP_USER_AGENT ^GetWeb! [OR]
RewriteCond %HTTP_USER_AGENT ^Go!Zilla [OR]
RewriteCond %HTTP_USER_AGENT ^Go-Ahead-Got-It [OR]
RewriteCond %HTTP_USER_AGENT ^GrabNet [OR]
RewriteCond %HTTP_USER_AGENT ^Grafula [OR]
RewriteCond %HTTP_USER_AGENT ^HMView [OR]
RewriteCond %HTTP_USER_AGENT HTTrack [NC,OR]
RewriteCond %HTTP_USER_AGENT ^Image Stripper [OR]
RewriteCond %HTTP_USER_AGENT ^Image Sucker [OR]
RewriteCond %HTTP_USER_AGENT Indy Library [NC,OR]
RewriteCond %HTTP_USER_AGENT ^InterGET [OR]
RewriteCond %HTTP_USER_AGENT ^Internet Ninja [OR]
RewriteCond %HTTP_USER_AGENT ^JetCar [OR]
RewriteCond %HTTP_USER_AGENT ^JOC Web Spider [OR]
RewriteCond %HTTP_USER_AGENT ^larbin [OR]
RewriteCond %HTTP_USER_AGENT ^LeechFTP [OR]
RewriteCond %HTTP_USER_AGENT ^Mass Downloader [OR]
RewriteCond %HTTP_USER_AGENT ^MIDown tool [OR]
RewriteCond %HTTP_USER_AGENT ^Mister PiX [OR]
RewriteCond %HTTP_USER_AGENT ^Navroad [OR]
RewriteCond %HTTP_USER_AGENT ^NearSite [OR]
RewriteCond %HTTP_USER_AGENT ^NetAnts [OR]
RewriteCond %HTTP_USER_AGENT ^NetSpider [OR]
RewriteCond %HTTP_USER_AGENT ^Net Vampire [OR]
RewriteCond %HTTP_USER_AGENT ^NetZIP [OR]
RewriteCond %HTTP_USER_AGENT ^Octopus [OR]
RewriteCond %HTTP_USER_AGENT ^Offline Explorer [OR]
RewriteCond %HTTP_USER_AGENT ^Offline Navigator [OR]
RewriteCond %HTTP_USER_AGENT ^PageGrabber [OR]
RewriteCond %HTTP_USER_AGENT ^Papa Foto [OR]
RewriteCond %HTTP_USER_AGENT ^pavuk [OR]
RewriteCond %HTTP_USER_AGENT ^pcBrowser [OR]
RewriteCond %HTTP_USER_AGENT ^RealDownload [OR]
RewriteCond %HTTP_USER_AGENT ^ReGet [OR]
RewriteCond %HTTP_USER_AGENT ^SiteSnagger [OR]
RewriteCond %HTTP_USER_AGENT ^SmartDownload [OR]
RewriteCond %HTTP_USER_AGENT ^SuperBot [OR]
RewriteCond %HTTP_USER_AGENT ^SuperHTTP [OR]
RewriteCond %HTTP_USER_AGENT ^Surfbot [OR]
RewriteCond %HTTP_USER_AGENT ^tAkeOut [OR]
RewriteCond %HTTP_USER_AGENT ^Teleport Pro [OR]
RewriteCond %HTTP_USER_AGENT ^VoidEYE [OR]
RewriteCond %HTTP_USER_AGENT ^Web Image Collector [OR]
RewriteCond %HTTP_USER_AGENT ^Web Sucker [OR]
RewriteCond %HTTP_USER_AGENT ^WebAuto [OR]
RewriteCond %HTTP_USER_AGENT ^WebCopier [OR]
RewriteCond %HTTP_USER_AGENT ^WebFetch [OR]
RewriteCond %HTTP_USER_AGENT ^WebGo IS [OR]
RewriteCond %HTTP_USER_AGENT ^WebLeacher [OR]
RewriteCond %HTTP_USER_AGENT ^WebReaper [OR]
RewriteCond %HTTP_USER_AGENT ^WebSauger [OR]
RewriteCond %HTTP_USER_AGENT ^Website eXtractor [OR]
RewriteCond %HTTP_USER_AGENT ^Website Quester [OR]
RewriteCond %HTTP_USER_AGENT ^WebStripper [OR]
RewriteCond %HTTP_USER_AGENT ^WebWhacker [OR]
RewriteCond %HTTP_USER_AGENT ^WebZIP [OR]
RewriteCond %HTTP_USER_AGENT ^Wget [OR]
RewriteCond %HTTP_USER_AGENT ^Widow [OR]
RewriteCond %HTTP_USER_AGENT ^WWWOFFLE [OR]
RewriteCond %HTTP_USER_AGENT ^Xaldon WebSpider [OR]
RewriteCond %HTTP_USER_AGENT ^Zeus
RewriteRule ^.* - [F,L]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress









share|improve this question




























    -1















    I have issue for leverage browser caching for svg images in wordpress and i have tried leverage browser caching and also add following code in .htaccess



    <ifModule mod_headers.c>
    <filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$">
    Header set Cache-Control "max-age=84600, public"
    </filesMatch>


    Still it show same error on GTmetrix.



    I searched over google for leverage browser cachin and tried different ways but not resolved the issue.



    Below is .htaccess what are the things wrong with it as gzip and leverage browser caching has still error though i added code in .htaccess



    SetEnv PHPRC /home/excell21/public_html/php.ini

    # Use PHPedge as default
    #AddHandler application/x-httpd-php-edge .php
    #<IfModule mod_suphp.c>
    # suPHP_ConfigPath /opt/phpedge/lib
    #</IfModule>

    ## EXPIRES CACHING ##
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
    AddOutputFilterByType DEFLATE application/x-font
    AddOutputFilterByType DEFLATE application/x-font-opentype
    AddOutputFilterByType DEFLATE application/x-font-otf
    AddOutputFilterByType DEFLATE application/x-font-truetype
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE font/opentype
    AddOutputFilterByType DEFLATE font/otf
    AddOutputFilterByType DEFLATE font/ttf
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE image/x-icon
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE text/plain
    </IfModule>

    <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.*
    </IfModule>

    <ifModule mod_headers.c>
    <filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$">
    Header set Cache-Control "max-age=84600, public"
    </filesMatch>

    <filesmatch ".(html|htm)$">
    Header set Cache-Control "max-age=7200, private, must-revalidate"
    </filesmatch>

    <filesmatch ".(pdf)$">
    Header set Cache-Control "max-age=86400, public"
    </filesmatch>

    <filesmatch ".(js)$">
    Header set Cache-Control "max-age=2678400, private"
    </filesmatch>

    </ifModule>
    <ifModule mod_headers.c>
    Header unset Vary
    Header set Vary "Accept-Encoding"
    </ifModule>


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



    # 6G:[QUERY STRINGS]
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %QUERY_STRING (eval() [NC,OR]
    RewriteCond %QUERY_STRING (127.0.0.1) [NC,OR]
    RewriteCond %QUERY_STRING ([a-z0-9]2000) [NC,OR]
    RewriteCond %QUERY_STRING (javascript:)(.*)(;) [NC,OR]
    RewriteCond %QUERY_STRING (base64_encode)(.*)(() [NC,OR]
    RewriteCond %QUERY_STRING (GLOBALS|REQUEST)(=|[|%) [NC,OR]
    RewriteCond %QUERY_STRING (<|%3C)(.*)script(.*)(>|%3) [NC,OR]
    RewriteCond %QUERY_STRING (\|...|../|~|`|<|>||) [NC,OR]
    RewriteCond %QUERY_STRING (boot.ini|etc/passwd|self/environ) [NC,OR]
    RewriteCond %QUERY_STRING (thumbs?(_editor|open)?|tim(thumb)?).php [NC,OR]
    RewriteCond %QUERY_STRING ('|")(.*)(drop|insert|md5|select|union) [NC]
    RewriteRule .* - [F]
    </IfModule>



    # TN - BEGIN Turn ETags Off
    FileETag None
    # TN - END Turn ETags Off



    # 6G:[REQUEST METHOD]
    <IfModule mod_rewrite.c>
    RewriteCond %REQUEST_METHOD ^(connect|debug|delete|move|put|trace|track) [NC]
    RewriteRule .* - [F]
    </IfModule>

    # 6G:[REQUEST STRINGS]

    <IfModule mod_alias.c>
    RedirectMatch 403 (?i)([a-z0-9]2000,)
    RedirectMatch 403 (?i)(https?|ftp|php):/
    RedirectMatch 403 (?i)(base64_encode)(.*)(()
    RedirectMatch 403 (?i)(=\'|=\%27|/\'/?).
    RedirectMatch 403 (?i)/($(&)?|*|"|.|,|&|&amp;?)/?$
    RedirectMatch 403 (?i)(0|(/(|...|+++|\"\")
    RedirectMatch 403 (?i)(~|`|<|>|:|;|,|%|\|s||[|]||)
    RedirectMatch 403 (?i)/(=|$&|_mm|cgi-|etc/passwd|muieblack)
    RedirectMatch 403 (?i)(&pws=0|_vti_|(null)|$itemURL|echo(.*)kae|etc/passwd|eval(|self/environ)
    RedirectMatch 403 (?i).(aspx?|bash|bak?|cfg|cgi|dll|exe|git|hg|ini|jsp|log|mdb|out|sql|svn|swp|tar|rar|rdf)$
    RedirectMatch 403 (?i)/(^$|(wp-)?config|mobiquo|phpinfo|shell|sqlpatch|thumb|thumb_editor|thumbopen|timthumb|webshell).php
    </IfModule>

    # 6G:[USER AGENTS]

    SetEnvIfNoCase User-Agent ([a-z0-9]2000) bad_bot
    SetEnvIfNoCase User-Agent (archive.org|binlar|casper|checkpriv|choppy|clshttp|cmsworld|diavol|dotbot|extract|feedfinder|flicky|g00g1e|harvest|heritrix|httrack|kmccrew|loader|miner|nikto|nutch|planetwork|postrank|purebot|pycurl|python|seekerspider|siclab|skygrid|sqlmap|sucker|turnit|vikspider|winhttp|xxxyy|youda|zmeu|zune) bad_bot
    Order Allow,Deny
    Allow from All
    Deny from env=bad_bot

    # 6G:[BAD IPS]
    Order Allow,Deny
    Allow from All
    # uncomment/edit/repeat next line to block IPs

    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4.0[678] no-gzip
    BrowserMatch bMSIE !no-gzip !gzip-only-text/html

    <FilesMatch ".(js|css|txt|xml)$">
    SetOutputFilter DEFLATE
    </FilesMatch>

    RewriteEngine On
    RewriteCond %HTTP_USER_AGENT ^BlackWidow [OR]
    RewriteCond %HTTP_USER_AGENT ^Bot mailto:craftbot@yahoo.com [OR]
    RewriteCond %HTTP_USER_AGENT ^ChinaClaw [OR]
    RewriteCond %HTTP_USER_AGENT ^Custo [OR]
    RewriteCond %HTTP_USER_AGENT ^DISCo [OR]
    RewriteCond %HTTP_USER_AGENT ^Download Demon [OR]
    RewriteCond %HTTP_USER_AGENT ^eCatch [OR]
    RewriteCond %HTTP_USER_AGENT ^EirGrabber [OR]
    RewriteCond %HTTP_USER_AGENT ^EmailSiphon [OR]
    RewriteCond %HTTP_USER_AGENT ^EmailWolf [OR]
    RewriteCond %HTTP_USER_AGENT ^Express WebPictures [OR]
    RewriteCond %HTTP_USER_AGENT ^ExtractorPro [OR]
    RewriteCond %HTTP_USER_AGENT ^EyeNetIE [OR]
    RewriteCond %HTTP_USER_AGENT ^FlashGet [OR]
    RewriteCond %HTTP_USER_AGENT ^GetRight [OR]
    RewriteCond %HTTP_USER_AGENT ^GetWeb! [OR]
    RewriteCond %HTTP_USER_AGENT ^Go!Zilla [OR]
    RewriteCond %HTTP_USER_AGENT ^Go-Ahead-Got-It [OR]
    RewriteCond %HTTP_USER_AGENT ^GrabNet [OR]
    RewriteCond %HTTP_USER_AGENT ^Grafula [OR]
    RewriteCond %HTTP_USER_AGENT ^HMView [OR]
    RewriteCond %HTTP_USER_AGENT HTTrack [NC,OR]
    RewriteCond %HTTP_USER_AGENT ^Image Stripper [OR]
    RewriteCond %HTTP_USER_AGENT ^Image Sucker [OR]
    RewriteCond %HTTP_USER_AGENT Indy Library [NC,OR]
    RewriteCond %HTTP_USER_AGENT ^InterGET [OR]
    RewriteCond %HTTP_USER_AGENT ^Internet Ninja [OR]
    RewriteCond %HTTP_USER_AGENT ^JetCar [OR]
    RewriteCond %HTTP_USER_AGENT ^JOC Web Spider [OR]
    RewriteCond %HTTP_USER_AGENT ^larbin [OR]
    RewriteCond %HTTP_USER_AGENT ^LeechFTP [OR]
    RewriteCond %HTTP_USER_AGENT ^Mass Downloader [OR]
    RewriteCond %HTTP_USER_AGENT ^MIDown tool [OR]
    RewriteCond %HTTP_USER_AGENT ^Mister PiX [OR]
    RewriteCond %HTTP_USER_AGENT ^Navroad [OR]
    RewriteCond %HTTP_USER_AGENT ^NearSite [OR]
    RewriteCond %HTTP_USER_AGENT ^NetAnts [OR]
    RewriteCond %HTTP_USER_AGENT ^NetSpider [OR]
    RewriteCond %HTTP_USER_AGENT ^Net Vampire [OR]
    RewriteCond %HTTP_USER_AGENT ^NetZIP [OR]
    RewriteCond %HTTP_USER_AGENT ^Octopus [OR]
    RewriteCond %HTTP_USER_AGENT ^Offline Explorer [OR]
    RewriteCond %HTTP_USER_AGENT ^Offline Navigator [OR]
    RewriteCond %HTTP_USER_AGENT ^PageGrabber [OR]
    RewriteCond %HTTP_USER_AGENT ^Papa Foto [OR]
    RewriteCond %HTTP_USER_AGENT ^pavuk [OR]
    RewriteCond %HTTP_USER_AGENT ^pcBrowser [OR]
    RewriteCond %HTTP_USER_AGENT ^RealDownload [OR]
    RewriteCond %HTTP_USER_AGENT ^ReGet [OR]
    RewriteCond %HTTP_USER_AGENT ^SiteSnagger [OR]
    RewriteCond %HTTP_USER_AGENT ^SmartDownload [OR]
    RewriteCond %HTTP_USER_AGENT ^SuperBot [OR]
    RewriteCond %HTTP_USER_AGENT ^SuperHTTP [OR]
    RewriteCond %HTTP_USER_AGENT ^Surfbot [OR]
    RewriteCond %HTTP_USER_AGENT ^tAkeOut [OR]
    RewriteCond %HTTP_USER_AGENT ^Teleport Pro [OR]
    RewriteCond %HTTP_USER_AGENT ^VoidEYE [OR]
    RewriteCond %HTTP_USER_AGENT ^Web Image Collector [OR]
    RewriteCond %HTTP_USER_AGENT ^Web Sucker [OR]
    RewriteCond %HTTP_USER_AGENT ^WebAuto [OR]
    RewriteCond %HTTP_USER_AGENT ^WebCopier [OR]
    RewriteCond %HTTP_USER_AGENT ^WebFetch [OR]
    RewriteCond %HTTP_USER_AGENT ^WebGo IS [OR]
    RewriteCond %HTTP_USER_AGENT ^WebLeacher [OR]
    RewriteCond %HTTP_USER_AGENT ^WebReaper [OR]
    RewriteCond %HTTP_USER_AGENT ^WebSauger [OR]
    RewriteCond %HTTP_USER_AGENT ^Website eXtractor [OR]
    RewriteCond %HTTP_USER_AGENT ^Website Quester [OR]
    RewriteCond %HTTP_USER_AGENT ^WebStripper [OR]
    RewriteCond %HTTP_USER_AGENT ^WebWhacker [OR]
    RewriteCond %HTTP_USER_AGENT ^WebZIP [OR]
    RewriteCond %HTTP_USER_AGENT ^Wget [OR]
    RewriteCond %HTTP_USER_AGENT ^Widow [OR]
    RewriteCond %HTTP_USER_AGENT ^WWWOFFLE [OR]
    RewriteCond %HTTP_USER_AGENT ^Xaldon WebSpider [OR]
    RewriteCond %HTTP_USER_AGENT ^Zeus
    RewriteRule ^.* - [F,L]

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %REQUEST_FILENAME !-f
    RewriteCond %REQUEST_FILENAME !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress









    share|improve this question


























      -1












      -1








      -1








      I have issue for leverage browser caching for svg images in wordpress and i have tried leverage browser caching and also add following code in .htaccess



      <ifModule mod_headers.c>
      <filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$">
      Header set Cache-Control "max-age=84600, public"
      </filesMatch>


      Still it show same error on GTmetrix.



      I searched over google for leverage browser cachin and tried different ways but not resolved the issue.



      Below is .htaccess what are the things wrong with it as gzip and leverage browser caching has still error though i added code in .htaccess



      SetEnv PHPRC /home/excell21/public_html/php.ini

      # Use PHPedge as default
      #AddHandler application/x-httpd-php-edge .php
      #<IfModule mod_suphp.c>
      # suPHP_ConfigPath /opt/phpedge/lib
      #</IfModule>

      ## EXPIRES CACHING ##
      <IfModule mod_deflate.c>
      AddOutputFilterByType DEFLATE application/javascript
      AddOutputFilterByType DEFLATE application/rss+xml
      AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
      AddOutputFilterByType DEFLATE application/x-font
      AddOutputFilterByType DEFLATE application/x-font-opentype
      AddOutputFilterByType DEFLATE application/x-font-otf
      AddOutputFilterByType DEFLATE application/x-font-truetype
      AddOutputFilterByType DEFLATE application/x-font-ttf
      AddOutputFilterByType DEFLATE application/x-javascript
      AddOutputFilterByType DEFLATE application/xhtml+xml
      AddOutputFilterByType DEFLATE application/xml
      AddOutputFilterByType DEFLATE font/opentype
      AddOutputFilterByType DEFLATE font/otf
      AddOutputFilterByType DEFLATE font/ttf
      AddOutputFilterByType DEFLATE image/svg+xml
      AddOutputFilterByType DEFLATE image/x-icon
      AddOutputFilterByType DEFLATE text/css
      AddOutputFilterByType DEFLATE text/html
      AddOutputFilterByType DEFLATE text/javascript
      AddOutputFilterByType DEFLATE text/plain
      </IfModule>

      <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.*
      </IfModule>

      <ifModule mod_headers.c>
      <filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$">
      Header set Cache-Control "max-age=84600, public"
      </filesMatch>

      <filesmatch ".(html|htm)$">
      Header set Cache-Control "max-age=7200, private, must-revalidate"
      </filesmatch>

      <filesmatch ".(pdf)$">
      Header set Cache-Control "max-age=86400, public"
      </filesmatch>

      <filesmatch ".(js)$">
      Header set Cache-Control "max-age=2678400, private"
      </filesmatch>

      </ifModule>
      <ifModule mod_headers.c>
      Header unset Vary
      Header set Vary "Accept-Encoding"
      </ifModule>


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



      # 6G:[QUERY STRINGS]
      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %QUERY_STRING (eval() [NC,OR]
      RewriteCond %QUERY_STRING (127.0.0.1) [NC,OR]
      RewriteCond %QUERY_STRING ([a-z0-9]2000) [NC,OR]
      RewriteCond %QUERY_STRING (javascript:)(.*)(;) [NC,OR]
      RewriteCond %QUERY_STRING (base64_encode)(.*)(() [NC,OR]
      RewriteCond %QUERY_STRING (GLOBALS|REQUEST)(=|[|%) [NC,OR]
      RewriteCond %QUERY_STRING (<|%3C)(.*)script(.*)(>|%3) [NC,OR]
      RewriteCond %QUERY_STRING (\|...|../|~|`|<|>||) [NC,OR]
      RewriteCond %QUERY_STRING (boot.ini|etc/passwd|self/environ) [NC,OR]
      RewriteCond %QUERY_STRING (thumbs?(_editor|open)?|tim(thumb)?).php [NC,OR]
      RewriteCond %QUERY_STRING ('|")(.*)(drop|insert|md5|select|union) [NC]
      RewriteRule .* - [F]
      </IfModule>



      # TN - BEGIN Turn ETags Off
      FileETag None
      # TN - END Turn ETags Off



      # 6G:[REQUEST METHOD]
      <IfModule mod_rewrite.c>
      RewriteCond %REQUEST_METHOD ^(connect|debug|delete|move|put|trace|track) [NC]
      RewriteRule .* - [F]
      </IfModule>

      # 6G:[REQUEST STRINGS]

      <IfModule mod_alias.c>
      RedirectMatch 403 (?i)([a-z0-9]2000,)
      RedirectMatch 403 (?i)(https?|ftp|php):/
      RedirectMatch 403 (?i)(base64_encode)(.*)(()
      RedirectMatch 403 (?i)(=\'|=\%27|/\'/?).
      RedirectMatch 403 (?i)/($(&)?|*|"|.|,|&|&amp;?)/?$
      RedirectMatch 403 (?i)(0|(/(|...|+++|\"\")
      RedirectMatch 403 (?i)(~|`|<|>|:|;|,|%|\|s||[|]||)
      RedirectMatch 403 (?i)/(=|$&|_mm|cgi-|etc/passwd|muieblack)
      RedirectMatch 403 (?i)(&pws=0|_vti_|(null)|$itemURL|echo(.*)kae|etc/passwd|eval(|self/environ)
      RedirectMatch 403 (?i).(aspx?|bash|bak?|cfg|cgi|dll|exe|git|hg|ini|jsp|log|mdb|out|sql|svn|swp|tar|rar|rdf)$
      RedirectMatch 403 (?i)/(^$|(wp-)?config|mobiquo|phpinfo|shell|sqlpatch|thumb|thumb_editor|thumbopen|timthumb|webshell).php
      </IfModule>

      # 6G:[USER AGENTS]

      SetEnvIfNoCase User-Agent ([a-z0-9]2000) bad_bot
      SetEnvIfNoCase User-Agent (archive.org|binlar|casper|checkpriv|choppy|clshttp|cmsworld|diavol|dotbot|extract|feedfinder|flicky|g00g1e|harvest|heritrix|httrack|kmccrew|loader|miner|nikto|nutch|planetwork|postrank|purebot|pycurl|python|seekerspider|siclab|skygrid|sqlmap|sucker|turnit|vikspider|winhttp|xxxyy|youda|zmeu|zune) bad_bot
      Order Allow,Deny
      Allow from All
      Deny from env=bad_bot

      # 6G:[BAD IPS]
      Order Allow,Deny
      Allow from All
      # uncomment/edit/repeat next line to block IPs

      AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4.0[678] no-gzip
      BrowserMatch bMSIE !no-gzip !gzip-only-text/html

      <FilesMatch ".(js|css|txt|xml)$">
      SetOutputFilter DEFLATE
      </FilesMatch>

      RewriteEngine On
      RewriteCond %HTTP_USER_AGENT ^BlackWidow [OR]
      RewriteCond %HTTP_USER_AGENT ^Bot mailto:craftbot@yahoo.com [OR]
      RewriteCond %HTTP_USER_AGENT ^ChinaClaw [OR]
      RewriteCond %HTTP_USER_AGENT ^Custo [OR]
      RewriteCond %HTTP_USER_AGENT ^DISCo [OR]
      RewriteCond %HTTP_USER_AGENT ^Download Demon [OR]
      RewriteCond %HTTP_USER_AGENT ^eCatch [OR]
      RewriteCond %HTTP_USER_AGENT ^EirGrabber [OR]
      RewriteCond %HTTP_USER_AGENT ^EmailSiphon [OR]
      RewriteCond %HTTP_USER_AGENT ^EmailWolf [OR]
      RewriteCond %HTTP_USER_AGENT ^Express WebPictures [OR]
      RewriteCond %HTTP_USER_AGENT ^ExtractorPro [OR]
      RewriteCond %HTTP_USER_AGENT ^EyeNetIE [OR]
      RewriteCond %HTTP_USER_AGENT ^FlashGet [OR]
      RewriteCond %HTTP_USER_AGENT ^GetRight [OR]
      RewriteCond %HTTP_USER_AGENT ^GetWeb! [OR]
      RewriteCond %HTTP_USER_AGENT ^Go!Zilla [OR]
      RewriteCond %HTTP_USER_AGENT ^Go-Ahead-Got-It [OR]
      RewriteCond %HTTP_USER_AGENT ^GrabNet [OR]
      RewriteCond %HTTP_USER_AGENT ^Grafula [OR]
      RewriteCond %HTTP_USER_AGENT ^HMView [OR]
      RewriteCond %HTTP_USER_AGENT HTTrack [NC,OR]
      RewriteCond %HTTP_USER_AGENT ^Image Stripper [OR]
      RewriteCond %HTTP_USER_AGENT ^Image Sucker [OR]
      RewriteCond %HTTP_USER_AGENT Indy Library [NC,OR]
      RewriteCond %HTTP_USER_AGENT ^InterGET [OR]
      RewriteCond %HTTP_USER_AGENT ^Internet Ninja [OR]
      RewriteCond %HTTP_USER_AGENT ^JetCar [OR]
      RewriteCond %HTTP_USER_AGENT ^JOC Web Spider [OR]
      RewriteCond %HTTP_USER_AGENT ^larbin [OR]
      RewriteCond %HTTP_USER_AGENT ^LeechFTP [OR]
      RewriteCond %HTTP_USER_AGENT ^Mass Downloader [OR]
      RewriteCond %HTTP_USER_AGENT ^MIDown tool [OR]
      RewriteCond %HTTP_USER_AGENT ^Mister PiX [OR]
      RewriteCond %HTTP_USER_AGENT ^Navroad [OR]
      RewriteCond %HTTP_USER_AGENT ^NearSite [OR]
      RewriteCond %HTTP_USER_AGENT ^NetAnts [OR]
      RewriteCond %HTTP_USER_AGENT ^NetSpider [OR]
      RewriteCond %HTTP_USER_AGENT ^Net Vampire [OR]
      RewriteCond %HTTP_USER_AGENT ^NetZIP [OR]
      RewriteCond %HTTP_USER_AGENT ^Octopus [OR]
      RewriteCond %HTTP_USER_AGENT ^Offline Explorer [OR]
      RewriteCond %HTTP_USER_AGENT ^Offline Navigator [OR]
      RewriteCond %HTTP_USER_AGENT ^PageGrabber [OR]
      RewriteCond %HTTP_USER_AGENT ^Papa Foto [OR]
      RewriteCond %HTTP_USER_AGENT ^pavuk [OR]
      RewriteCond %HTTP_USER_AGENT ^pcBrowser [OR]
      RewriteCond %HTTP_USER_AGENT ^RealDownload [OR]
      RewriteCond %HTTP_USER_AGENT ^ReGet [OR]
      RewriteCond %HTTP_USER_AGENT ^SiteSnagger [OR]
      RewriteCond %HTTP_USER_AGENT ^SmartDownload [OR]
      RewriteCond %HTTP_USER_AGENT ^SuperBot [OR]
      RewriteCond %HTTP_USER_AGENT ^SuperHTTP [OR]
      RewriteCond %HTTP_USER_AGENT ^Surfbot [OR]
      RewriteCond %HTTP_USER_AGENT ^tAkeOut [OR]
      RewriteCond %HTTP_USER_AGENT ^Teleport Pro [OR]
      RewriteCond %HTTP_USER_AGENT ^VoidEYE [OR]
      RewriteCond %HTTP_USER_AGENT ^Web Image Collector [OR]
      RewriteCond %HTTP_USER_AGENT ^Web Sucker [OR]
      RewriteCond %HTTP_USER_AGENT ^WebAuto [OR]
      RewriteCond %HTTP_USER_AGENT ^WebCopier [OR]
      RewriteCond %HTTP_USER_AGENT ^WebFetch [OR]
      RewriteCond %HTTP_USER_AGENT ^WebGo IS [OR]
      RewriteCond %HTTP_USER_AGENT ^WebLeacher [OR]
      RewriteCond %HTTP_USER_AGENT ^WebReaper [OR]
      RewriteCond %HTTP_USER_AGENT ^WebSauger [OR]
      RewriteCond %HTTP_USER_AGENT ^Website eXtractor [OR]
      RewriteCond %HTTP_USER_AGENT ^Website Quester [OR]
      RewriteCond %HTTP_USER_AGENT ^WebStripper [OR]
      RewriteCond %HTTP_USER_AGENT ^WebWhacker [OR]
      RewriteCond %HTTP_USER_AGENT ^WebZIP [OR]
      RewriteCond %HTTP_USER_AGENT ^Wget [OR]
      RewriteCond %HTTP_USER_AGENT ^Widow [OR]
      RewriteCond %HTTP_USER_AGENT ^WWWOFFLE [OR]
      RewriteCond %HTTP_USER_AGENT ^Xaldon WebSpider [OR]
      RewriteCond %HTTP_USER_AGENT ^Zeus
      RewriteRule ^.* - [F,L]

      # BEGIN WordPress
      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
      RewriteRule ^index.php$ - [L]
      RewriteCond %REQUEST_FILENAME !-f
      RewriteCond %REQUEST_FILENAME !-d
      RewriteRule . /index.php [L]
      </IfModule>

      # END WordPress









      share|improve this question
















      I have issue for leverage browser caching for svg images in wordpress and i have tried leverage browser caching and also add following code in .htaccess



      <ifModule mod_headers.c>
      <filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$">
      Header set Cache-Control "max-age=84600, public"
      </filesMatch>


      Still it show same error on GTmetrix.



      I searched over google for leverage browser cachin and tried different ways but not resolved the issue.



      Below is .htaccess what are the things wrong with it as gzip and leverage browser caching has still error though i added code in .htaccess



      SetEnv PHPRC /home/excell21/public_html/php.ini

      # Use PHPedge as default
      #AddHandler application/x-httpd-php-edge .php
      #<IfModule mod_suphp.c>
      # suPHP_ConfigPath /opt/phpedge/lib
      #</IfModule>

      ## EXPIRES CACHING ##
      <IfModule mod_deflate.c>
      AddOutputFilterByType DEFLATE application/javascript
      AddOutputFilterByType DEFLATE application/rss+xml
      AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
      AddOutputFilterByType DEFLATE application/x-font
      AddOutputFilterByType DEFLATE application/x-font-opentype
      AddOutputFilterByType DEFLATE application/x-font-otf
      AddOutputFilterByType DEFLATE application/x-font-truetype
      AddOutputFilterByType DEFLATE application/x-font-ttf
      AddOutputFilterByType DEFLATE application/x-javascript
      AddOutputFilterByType DEFLATE application/xhtml+xml
      AddOutputFilterByType DEFLATE application/xml
      AddOutputFilterByType DEFLATE font/opentype
      AddOutputFilterByType DEFLATE font/otf
      AddOutputFilterByType DEFLATE font/ttf
      AddOutputFilterByType DEFLATE image/svg+xml
      AddOutputFilterByType DEFLATE image/x-icon
      AddOutputFilterByType DEFLATE text/css
      AddOutputFilterByType DEFLATE text/html
      AddOutputFilterByType DEFLATE text/javascript
      AddOutputFilterByType DEFLATE text/plain
      </IfModule>

      <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.*
      </IfModule>

      <ifModule mod_headers.c>
      <filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$">
      Header set Cache-Control "max-age=84600, public"
      </filesMatch>

      <filesmatch ".(html|htm)$">
      Header set Cache-Control "max-age=7200, private, must-revalidate"
      </filesmatch>

      <filesmatch ".(pdf)$">
      Header set Cache-Control "max-age=86400, public"
      </filesmatch>

      <filesmatch ".(js)$">
      Header set Cache-Control "max-age=2678400, private"
      </filesmatch>

      </ifModule>
      <ifModule mod_headers.c>
      Header unset Vary
      Header set Vary "Accept-Encoding"
      </ifModule>


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



      # 6G:[QUERY STRINGS]
      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %QUERY_STRING (eval() [NC,OR]
      RewriteCond %QUERY_STRING (127.0.0.1) [NC,OR]
      RewriteCond %QUERY_STRING ([a-z0-9]2000) [NC,OR]
      RewriteCond %QUERY_STRING (javascript:)(.*)(;) [NC,OR]
      RewriteCond %QUERY_STRING (base64_encode)(.*)(() [NC,OR]
      RewriteCond %QUERY_STRING (GLOBALS|REQUEST)(=|[|%) [NC,OR]
      RewriteCond %QUERY_STRING (<|%3C)(.*)script(.*)(>|%3) [NC,OR]
      RewriteCond %QUERY_STRING (\|...|../|~|`|<|>||) [NC,OR]
      RewriteCond %QUERY_STRING (boot.ini|etc/passwd|self/environ) [NC,OR]
      RewriteCond %QUERY_STRING (thumbs?(_editor|open)?|tim(thumb)?).php [NC,OR]
      RewriteCond %QUERY_STRING ('|")(.*)(drop|insert|md5|select|union) [NC]
      RewriteRule .* - [F]
      </IfModule>



      # TN - BEGIN Turn ETags Off
      FileETag None
      # TN - END Turn ETags Off



      # 6G:[REQUEST METHOD]
      <IfModule mod_rewrite.c>
      RewriteCond %REQUEST_METHOD ^(connect|debug|delete|move|put|trace|track) [NC]
      RewriteRule .* - [F]
      </IfModule>

      # 6G:[REQUEST STRINGS]

      <IfModule mod_alias.c>
      RedirectMatch 403 (?i)([a-z0-9]2000,)
      RedirectMatch 403 (?i)(https?|ftp|php):/
      RedirectMatch 403 (?i)(base64_encode)(.*)(()
      RedirectMatch 403 (?i)(=\'|=\%27|/\'/?).
      RedirectMatch 403 (?i)/($(&)?|*|"|.|,|&|&amp;?)/?$
      RedirectMatch 403 (?i)(0|(/(|...|+++|\"\")
      RedirectMatch 403 (?i)(~|`|<|>|:|;|,|%|\|s||[|]||)
      RedirectMatch 403 (?i)/(=|$&|_mm|cgi-|etc/passwd|muieblack)
      RedirectMatch 403 (?i)(&pws=0|_vti_|(null)|$itemURL|echo(.*)kae|etc/passwd|eval(|self/environ)
      RedirectMatch 403 (?i).(aspx?|bash|bak?|cfg|cgi|dll|exe|git|hg|ini|jsp|log|mdb|out|sql|svn|swp|tar|rar|rdf)$
      RedirectMatch 403 (?i)/(^$|(wp-)?config|mobiquo|phpinfo|shell|sqlpatch|thumb|thumb_editor|thumbopen|timthumb|webshell).php
      </IfModule>

      # 6G:[USER AGENTS]

      SetEnvIfNoCase User-Agent ([a-z0-9]2000) bad_bot
      SetEnvIfNoCase User-Agent (archive.org|binlar|casper|checkpriv|choppy|clshttp|cmsworld|diavol|dotbot|extract|feedfinder|flicky|g00g1e|harvest|heritrix|httrack|kmccrew|loader|miner|nikto|nutch|planetwork|postrank|purebot|pycurl|python|seekerspider|siclab|skygrid|sqlmap|sucker|turnit|vikspider|winhttp|xxxyy|youda|zmeu|zune) bad_bot
      Order Allow,Deny
      Allow from All
      Deny from env=bad_bot

      # 6G:[BAD IPS]
      Order Allow,Deny
      Allow from All
      # uncomment/edit/repeat next line to block IPs

      AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4.0[678] no-gzip
      BrowserMatch bMSIE !no-gzip !gzip-only-text/html

      <FilesMatch ".(js|css|txt|xml)$">
      SetOutputFilter DEFLATE
      </FilesMatch>

      RewriteEngine On
      RewriteCond %HTTP_USER_AGENT ^BlackWidow [OR]
      RewriteCond %HTTP_USER_AGENT ^Bot mailto:craftbot@yahoo.com [OR]
      RewriteCond %HTTP_USER_AGENT ^ChinaClaw [OR]
      RewriteCond %HTTP_USER_AGENT ^Custo [OR]
      RewriteCond %HTTP_USER_AGENT ^DISCo [OR]
      RewriteCond %HTTP_USER_AGENT ^Download Demon [OR]
      RewriteCond %HTTP_USER_AGENT ^eCatch [OR]
      RewriteCond %HTTP_USER_AGENT ^EirGrabber [OR]
      RewriteCond %HTTP_USER_AGENT ^EmailSiphon [OR]
      RewriteCond %HTTP_USER_AGENT ^EmailWolf [OR]
      RewriteCond %HTTP_USER_AGENT ^Express WebPictures [OR]
      RewriteCond %HTTP_USER_AGENT ^ExtractorPro [OR]
      RewriteCond %HTTP_USER_AGENT ^EyeNetIE [OR]
      RewriteCond %HTTP_USER_AGENT ^FlashGet [OR]
      RewriteCond %HTTP_USER_AGENT ^GetRight [OR]
      RewriteCond %HTTP_USER_AGENT ^GetWeb! [OR]
      RewriteCond %HTTP_USER_AGENT ^Go!Zilla [OR]
      RewriteCond %HTTP_USER_AGENT ^Go-Ahead-Got-It [OR]
      RewriteCond %HTTP_USER_AGENT ^GrabNet [OR]
      RewriteCond %HTTP_USER_AGENT ^Grafula [OR]
      RewriteCond %HTTP_USER_AGENT ^HMView [OR]
      RewriteCond %HTTP_USER_AGENT HTTrack [NC,OR]
      RewriteCond %HTTP_USER_AGENT ^Image Stripper [OR]
      RewriteCond %HTTP_USER_AGENT ^Image Sucker [OR]
      RewriteCond %HTTP_USER_AGENT Indy Library [NC,OR]
      RewriteCond %HTTP_USER_AGENT ^InterGET [OR]
      RewriteCond %HTTP_USER_AGENT ^Internet Ninja [OR]
      RewriteCond %HTTP_USER_AGENT ^JetCar [OR]
      RewriteCond %HTTP_USER_AGENT ^JOC Web Spider [OR]
      RewriteCond %HTTP_USER_AGENT ^larbin [OR]
      RewriteCond %HTTP_USER_AGENT ^LeechFTP [OR]
      RewriteCond %HTTP_USER_AGENT ^Mass Downloader [OR]
      RewriteCond %HTTP_USER_AGENT ^MIDown tool [OR]
      RewriteCond %HTTP_USER_AGENT ^Mister PiX [OR]
      RewriteCond %HTTP_USER_AGENT ^Navroad [OR]
      RewriteCond %HTTP_USER_AGENT ^NearSite [OR]
      RewriteCond %HTTP_USER_AGENT ^NetAnts [OR]
      RewriteCond %HTTP_USER_AGENT ^NetSpider [OR]
      RewriteCond %HTTP_USER_AGENT ^Net Vampire [OR]
      RewriteCond %HTTP_USER_AGENT ^NetZIP [OR]
      RewriteCond %HTTP_USER_AGENT ^Octopus [OR]
      RewriteCond %HTTP_USER_AGENT ^Offline Explorer [OR]
      RewriteCond %HTTP_USER_AGENT ^Offline Navigator [OR]
      RewriteCond %HTTP_USER_AGENT ^PageGrabber [OR]
      RewriteCond %HTTP_USER_AGENT ^Papa Foto [OR]
      RewriteCond %HTTP_USER_AGENT ^pavuk [OR]
      RewriteCond %HTTP_USER_AGENT ^pcBrowser [OR]
      RewriteCond %HTTP_USER_AGENT ^RealDownload [OR]
      RewriteCond %HTTP_USER_AGENT ^ReGet [OR]
      RewriteCond %HTTP_USER_AGENT ^SiteSnagger [OR]
      RewriteCond %HTTP_USER_AGENT ^SmartDownload [OR]
      RewriteCond %HTTP_USER_AGENT ^SuperBot [OR]
      RewriteCond %HTTP_USER_AGENT ^SuperHTTP [OR]
      RewriteCond %HTTP_USER_AGENT ^Surfbot [OR]
      RewriteCond %HTTP_USER_AGENT ^tAkeOut [OR]
      RewriteCond %HTTP_USER_AGENT ^Teleport Pro [OR]
      RewriteCond %HTTP_USER_AGENT ^VoidEYE [OR]
      RewriteCond %HTTP_USER_AGENT ^Web Image Collector [OR]
      RewriteCond %HTTP_USER_AGENT ^Web Sucker [OR]
      RewriteCond %HTTP_USER_AGENT ^WebAuto [OR]
      RewriteCond %HTTP_USER_AGENT ^WebCopier [OR]
      RewriteCond %HTTP_USER_AGENT ^WebFetch [OR]
      RewriteCond %HTTP_USER_AGENT ^WebGo IS [OR]
      RewriteCond %HTTP_USER_AGENT ^WebLeacher [OR]
      RewriteCond %HTTP_USER_AGENT ^WebReaper [OR]
      RewriteCond %HTTP_USER_AGENT ^WebSauger [OR]
      RewriteCond %HTTP_USER_AGENT ^Website eXtractor [OR]
      RewriteCond %HTTP_USER_AGENT ^Website Quester [OR]
      RewriteCond %HTTP_USER_AGENT ^WebStripper [OR]
      RewriteCond %HTTP_USER_AGENT ^WebWhacker [OR]
      RewriteCond %HTTP_USER_AGENT ^WebZIP [OR]
      RewriteCond %HTTP_USER_AGENT ^Wget [OR]
      RewriteCond %HTTP_USER_AGENT ^Widow [OR]
      RewriteCond %HTTP_USER_AGENT ^WWWOFFLE [OR]
      RewriteCond %HTTP_USER_AGENT ^Xaldon WebSpider [OR]
      RewriteCond %HTTP_USER_AGENT ^Zeus
      RewriteRule ^.* - [F,L]

      # BEGIN WordPress
      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
      RewriteRule ^index.php$ - [L]
      RewriteCond %REQUEST_FILENAME !-f
      RewriteCond %REQUEST_FILENAME !-d
      RewriteRule . /index.php [L]
      </IfModule>

      # END WordPress






      wordpress .htaccess






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 18 '18 at 13:44









      Andrew Medico

      17.7k84770




      17.7k84770










      asked Nov 15 '18 at 5:16









      raju_ewwraju_eww

      547418




      547418






















          1 Answer
          1






          active

          oldest

          votes


















          0














          This is what I use:



          <FilesMatch ".(webm|ogg|mp4|ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)(.gz)?$">


          Thinking maybe you might need the "" before the . and also the ?






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53312861%2fleverage-browser-caching-using-htaccess%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            This is what I use:



            <FilesMatch ".(webm|ogg|mp4|ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)(.gz)?$">


            Thinking maybe you might need the "" before the . and also the ?






            share|improve this answer





























              0














              This is what I use:



              <FilesMatch ".(webm|ogg|mp4|ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)(.gz)?$">


              Thinking maybe you might need the "" before the . and also the ?






              share|improve this answer



























                0












                0








                0







                This is what I use:



                <FilesMatch ".(webm|ogg|mp4|ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)(.gz)?$">


                Thinking maybe you might need the "" before the . and also the ?






                share|improve this answer















                This is what I use:



                <FilesMatch ".(webm|ogg|mp4|ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)(.gz)?$">


                Thinking maybe you might need the "" before the . and also the ?







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 16 '18 at 17:30









                GSerg

                60.1k15107233




                60.1k15107233










                answered Nov 15 '18 at 14:45









                SchaOn BlodgettSchaOn Blodgett

                11




                11





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53312861%2fleverage-browser-caching-using-htaccess%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Use pre created SQLite database for Android project in kotlin

                    Darth Vader #20

                    Ondo