IT Questions and Answers :)

Saturday, February 22, 2020

On an Apache webserver, what is the name of the file used to configure access to the web site?

On an Apache webserver, what is the name of the file used to configure access to the web site?

  • .htaccess
  • htaccess.txt
  • htaccess.cfg
  • htaccess
On an Apache webserver, what is the name of the file used to configure access to the web site?

EXPLANATION

An .htaccess file also known as an hypertext access file is a directory-level configuration file supported by several web servers, used for configuration of site-access issues, such as URL redirection, URL shortening and Access-security control.
An .htaccess file provides various options for website owners to control the server environment variables and other parameters to enhance functionality of their websites. It is placed in the directories and sub-directories of the Apache document root. When you place an .htaccess file in the apache document root, the .htaccess file is detected and executed by the Apache Web Server.
These .htaccess files can be used to alter the configuration of the Apache Web Server to enable and disable additional functionality and features that the Apache Web Server software has to offer. When you are developing a PHP website and working with PHP and Apache, then you can use an .htaccess file for directory level configuration of Apache web server.
You should only use .htaccess files when you don't have root access to the main Apache server configuration file. An .htaccess file provides many features Some of these features include basic redirects, locking outside access to particular files, or more advanced functions such as content password protection or preventing image hotlinking.
However, use of .htaccess files should be avoided when possible. There are two main reasons to avoid the use of .htaccess files.
The first of these is server 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 causes a performance issue, whether or not you actually even use them! Also, the .htaccess file is loaded every time a document is requested.
Share:

0 comments:

Post a Comment

Popular Posts