apache - ".htaccess" doesn't work for cache-control at sub directories -


i made own cache-control rule in httpd.conf. , need apply different rules on each different sub directories.

i made no-cache .do extension default(httpd.conf).

# use .htaccess files overriding, accessfilename .htaccess  ...       <ifmodule mod_headers.c>       <locationmatch "\.(do)$">         header append cache-control "max-age=0, no-cache, no-store, must-revalidate"       </locationmatch>     </ifmodule> 

and need cache directories(.htaccess).

example url : xxx.com/en/product.do

so made .htaccess on <webroot>/en.

<ifmodule mod_headers.c>   <locationmatch "\.(do)$">     header set cache-control "max-age=216000, public, must-revalidate"   </locationmatch> </ifmodule> 

am going wrong? there other way rule different on different directories?

nothing <locationmatch> can used in .htaccess; generate runtime error.

also, *.do proxied, in case no filesystem directory ever read .htaccess.

i suggest putting second stanza first, , adding ^/en/ front.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -