Hide Your .htaccess Settings Using … .htaccess

Your .htaccess file can hold a good amount of information about the structure of your website, some of which should not be exposed to users. These settings include mod_rewrite settings, php_flag/php_value settings, and SetHandler directives.

Luckily, you can use your .htaccess file to hide your .htaccess file. Here's how:

The Code

<files .htaccess>
order allow,deny
deny from all
</files>

Comments

  1. AskApache

    A better way from the askapache.com htaccess tutorial technically is:

    Order allow,deny
    Deny from all


Be Heard!

Share your thoughts without being a jerk! And wrap your code in <code> tags, f00!

Name*:
Email*:
Website: