• Home
  • Search Tags
  • About

Hypertext Access file

Topics related to Hypertext Access file:

Getting started with Hypertext Access file

An .htaccess file controls how Apache interacts with your site. When an .htaccess file is placed in your domain’s directory (usually root directory), the file is detected and executed by Apache.

An .htaccess file is commonly used for the following:

  • Denying specific IPs to your site
  • Password protecting your site
  • Rewriting URLs
  • Custom error pages
  • Compressing and Caching Files
  • General Security and Hack Prevention

Rewriting and Redirecting

Before URLs can be rewritten, a module called mod_rewrite.c needs to be enabled. Usually, it is disabled in the configuration by default.

mod_rewrite can be enabled by executing the command

$ sudo a2enmod mod_rewrite
$ sudo service apache2 restart

or by commenting out the lines

#LoadModule rewrite_module modules/mod_rewrite.so
#AddModule mod_rewrite.c

in httpd.conf file.

Handling File Types

General Security and Hack Prevention

.htaccess redirection is a common vector for malicious hackers to exploit and infect websites. We have seen what .htaccess files are, how they are used by malicious hackers, and how to protect your website.

Speed Optimization

Denying Access

Content on the page is taken from Stack Overflow Documentation

This site is NOT affiliated with Stack Overflow or any of the contributors. | Privacy Policy | Terms of Service