Login | Register RSS


All Questions
Apache [2]
Automotive [1]
Contracting [1]
Electronics [1]
Gardening [1]
Home [3]
Linux [20]
Miscellaneous [2]
MySQL [2]
Perl [1]
Tea [1]
WiFi [1]
Windows [1]

.htaccess Security
Posted on 02/11/2012

Here is a simple .htaccess file for use with Apache, which handles many the basics:

First , it prevents reading of any filenames which begin with ".ht"; such as ".htaccess" & ".htpasswrd".

Second, it removes PUT & DELETE abilities, but allows GET & POST.

Third the GET/POST block specific IP addresses or IP subnets.

You can use something like this as a base, and build upon it for other things.

Order Deny,Allow

<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy all

Deny from all

<Limit GET POST>
Deny from
Deny from

If you like this site or any of its content, please help promote it. Use the social media buttons below to help spread the word. Don't forget to post in the comments section.

  Print   Email
Latest Blog Posts:
Latest Pages:

© 2020 BuildDesignCreate.com • All Rights Reserved
Privacy PolicyAdvertise with UsContact UsSite Map