Skip to main content

Posts

Showing posts with the label htaccess

Server Security - Secure Your Website using. Htaccess file

What is .htaccess file . htaccess files provide a way to make configuration on a per-directory basis. In the .htaccess file, we provide directives to apply a configuration. When to use .htaccess Generally, this file should be used when you have no access to your server configuration file (httpd.conf). The best example would be shared hosting providers where you don’t get root access to make changes in httpd.conf file. In such scenarios .htaccess plays a very important role. In shared hosting, we make .htaccess files to secure our websites. We create this file on each directory to secure it from hackers or attackers. When to avoid .htaccess file We should not use this if we have access to our main configuration file. There are two main reasons to avoid the use of .htaccess file. The first of these is performance . When  AllowOverride  is set to allow the use of  .htaccess  files, httpd will look in every directory for  .htaccess  files. Thus, permitting  .htaccess  files cause a perfo