I need to block access to all files on my website except for images and my stylesheet. I need to do this in an .htaccess file. How can I manage to do this?
My current .htaccess-file looks like this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule "^([^/]+)/([^/]+)/([^/]+)" index.php?page=$1&action=$2&$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule "^([^/]+)/([^/]+)/" index.php?page=$1&action=$2 [L]
The current rewrite-rules are set to build a link to my index.php with the name of the directories as get-parameters.