Base de conocimiento

Obtén hosting web experto

Elija la fiabilidad del sitio web y el conocimiento con SiteGround!

Inicio / Ayuda con Páginas Web / Otros / ¿Es posible cambiar la directiva AllowOverride de Apache a 'All'?

¿Es posible cambiar la directiva AllowOverride de Apache a 'All'?

Última actualización: Jun 10, 2021

La directiva AllowOverride en la configuración de Apache está establecida en ‘All’ en todos los servidores.

De este modo, puedes usar un archivo .htaccess local y definir opciones tales como:

#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
# SecAuditLog logs/audit_log # Not sure what my host would think of that…
SecFilterDefaultAction “deny,status:412”
# WEB-ATTACKS wget command attempt
SecFilterSelective THE_REQUEST “wget ”

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

Nota: No uses un archivo .htaccess para especificar ajustes PHP. Los ajustes PHP se pueden cambiar solamente con un archivo php.ini local.

Comparte este artículo