.htaccess - Can deflate/gzip be with "deny from all"? -
i kind of confused .htaccess file. want gzip compression , deny in directory. question can "deny all" gzip compression or has problems?
# compress text, html, javascript, css, xml: addoutputfilterbytype deflate text/plain addoutputfilterbytype deflate text/html addoutputfilterbytype deflate text/xml addoutputfilterbytype deflate text/css addoutputfilterbytype deflate application/xml addoutputfilterbytype deflate application/xhtml+xml addoutputfilterbytype deflate application/rss+xml addoutputfilterbytype deflate application/javascript addoutputfilterbytype deflate application/x-javascript # or, compress file types extension: <files *.html> setoutputfilter deflate </files> deny
deny all
means no 1 can access directory directly via url. content sent browser directory has come via server-side script placed elsewhere, means .htaccess bypassed entirely - compression won't take place.
your server-side script therefore have perform compression on own using http_deflate
before outputting data files.
Comments
Post a Comment