How to make Apache redirect to 403 error?
I tried:
RewriteRule ^forbid/(.*)$ / [R=403,L]
this caused an error of 500 servers throughout the site
RewriteRule ^forbid/(.*)$ - [R=403,L]
and
RewriteRule ^forbid/(.*)$ [R=403,L]
they just don't work
. I have the following .htaccess file:
RewriteEngine on
RewriteRule ^(config|backup)(.*)$ - [F] [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^admin/(.*)$ /admin/index.php?%{QUERY_STRING} [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !util
RewriteRule ^(.*)$ index.php?%{QUERY_STRING} [L,QSA]
Please help me!
source
share