Search code examples
phpapache2xenforo

Are my Apache2 RewriteEngine On and AllowOverride All changes secure?


I made some changes to my website configuration in order to get friendly urls working on Xenforo2 running on Apache2.

a) I turned RewriteEngine "On" in my .htaccess file

b) I modified RewriteBase to '/' in my .htaccess file

c) I changed AllowOverride from "None" to "All" in the section of my Apache2 configuration.

Do any of these changes open me up to security problems down the line? My apache2 version is 2.4.25 (Debian)


Solution

  • No. Those 3 additions/modifications to your .htaccess file and apache config pose no direct security risk.

    • Turning on RewriteEngine is simply that. Allowing htaccess to make redirects etc.
    • Changing the RewriteBase simply sets the base url that redirects will happen from. More information can be found here: How does RewriteBase work in .htaccess
    • Setting AllowOverride from None to All in your apache configuration allows your .htaccess file to work at all. If it was set to None, your .htaccess would not work, as htaccess is an override of your apache config.