Htaccess

From BlueFur.com Support Wiki

Jump to: navigation, search

A .htaccess file is a text file that is used to configure certain directives to the Apache running on the server. The .htaccess file works for all folders below it unless there is an another .htaccess in that folder. It provides the ability to customize configuration for requests to the particular directory. The file name starts with a dot because dot-files are by convention hidden files on Unix-like operating systems

Examples

This example blocks certain file extensions from being viewed in a folder.:

<FilesMatch "\.(php|php5|php4|php3|htm|html|shtml)$">
Order Allow,Deny
Deny from all
</FilesMatch>

This example allows you to block anyone from browsing a folder:

<limit GET POST PUT>
order deny,allow
deny from all
</limit>

The next is an example that blocks everyone from browsing a folder but a specific IP:

<limit GET POST PUT>
order deny,allow
allow from 212.54.122.33
deny from all
</limit>

Personal tools