Home
/
Website Help
/
Other
/
Is it possible to set Apache's AllowOverride directive to All

Is it possible to set Apache's AllowOverride directive to All

The AllowOverride directive in the Apache’s configuration has been set to ‘All’ on all servers.

Thus, you are able to use a local .htaccess file and define options such as:

#Enable mod_rewrite and insert some sample rules:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]         ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|.htm|.php|.html|/[^.]*)$  [NC]
RewriteRule ^(content/|component/) index.php

#Enable security mod:
SecFilterEngine On
SecFilterScanPOST On
SecFilterDefaultAction "deny,status:412"
# WEB-ATTACKS wget command attempt
SecFilterSelective THE_REQUEST "wget "

#Set different handlers for scripts:
AddHandler nonworkig .cgi .pl .py

Note: The above works only if you disable the NGINX Direct Delivery for your website. You can see how to do that in this tutorial.

RELATED ARTICLES

Share This Article