What is .htaccess Files

Htaccess File can be described as a configuration file that is used on web servers that are run by Apache Web server software. The htaccess file is normally placed in a directory and the directory is loaded on the Apache Web server. Once the htaccess is detected the Apache web server will execute it immediately.

Htaccess is also referred to as “Hypertext access” and it is a configuration file that simply controls the directly in which it is found. Htaccess also controls the sub-directories under the main directory it is found.

What can we do with Htaccess File:

  1. Make 301 redirect and other redirect types from one page to another.
  2. Rewrite your URLs to appear SEO friendly.
  3. Specify custom error pages for example for 404 error.
  4. Blocking users by using IP or by domain.
  5. Control folder listing when the visitor try to browse a real folder.
  6. Control the web browser caching.
  7. Adding MIME types.
  8. Folder password protection

This is the most common functions for it, there is many other uses.


  1. No comments yet!, be the first to post a comment.

Your email will not be published, The required fields marked with '*'