.htaccess - Deny direct access to files but allow query strings in htaccess -
so browsed through htaccess solutions none scenario...
basically want deny direct access file types except ones listed, this:
order deny,allow deny <filesmatch ".(flv|gif|jpg|jpeg|png|ico|swf|js|css|less|pdf|php|html)$"> allow </filesmatch>
the problem can't use urls /?foo=bar must use /index.php?foo=bar ...
how solve this? rewritecond? can drop oneliner same?
thanks.
this worked:
<filesmatch ".(flv|gif|jpg|jpeg|png|ico|swf|js|css|less|pdf|php|html|htm)$"> allow </filesmatch> <filesmatch "^(index\.php)?$"> allow </filesmatch>
Comments
Post a Comment