Answer the question
In order to leave comments, you need to log in
How to disable csv file caching via .htaaccess?
There is such .htaaccess
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} //+
RewriteRule ^(.*) $1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+(.*?)/+(/[^\s]+) [NC]
RewriteRule ^ %1%2 [R=301,L]
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule (.*) %1/%2 [R=301,L]
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ /? [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{QUERY_STRING} ^page=(1)\&
RewriteRule ^(.*)/index(.*)$ /$1? [R=301,L]
FileETag MTime Size
<ifmodule mod_expires.c>
<filesmatch ".(svg|jpg|jpeg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
</filesmatch>
</ifmodule>
#<IfModule mod_deflate.c>
#SetOutputFilter DEFLATE
#Header append Vary User-Agent
#</IfModule>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)/$ /$1 [R=301,L]
<filesmatch ".(svg|jpg|jpeg|gif|png|ico|css|js)$">
Answer the question
In order to leave comments, you need to log in
<FilesMatch "\.(csv)$">
<IfModule mod_expires.c>
ExpiresActive Off
</IfModule>
<IfModule mod_headers.c>
FileETag None
Header unset ETag
Header unset Pragma
Header unset Cache-Control
Header unset Last-Modified
Header set Pragma "no-cache"
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT"
</IfModule>
</FilesMatch>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question