.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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -