htaccess and how to disable

by Manoj 2012-04-21 12:11:14


What is .htaccess and how to disable .htaccess?

.htaccess is use to modify the way Apache behaves for a directory and its sub-directories. It gives you an extra control on your server, like setting up custom error messages, password protect a directory, writing rewrite rules, blocking IPs etc.

However, it can be a potentially dangerous file. For example, a hacker can redirect your website to an external website say a malware website.

In order to disable .htaccess server wide, edit the Apache configuration file

pico /etc/httpd/conf/httpd.conf

Search for

AllowOverride All

replace it with

AllowOverride None

Save the file and restart the Apache service.

service httpd restart

Tagged in:

1028
like
0
dislike
0
mail
flag

You must LOGIN to add comments