What can I do with an .htaccess file?

Overview

There are several things you can do with an .htaccess file to customize your site. Below are a few examples:

  • Changing PHP settings in an .htaccess file
  • How can I control file extensions with an .htaccess file?
  • How can I redirect and rewrite my URLs?
  • How do I deny access to my site?
  • Force your site to load securely
  • Password protecting your site with an .htaccess file
  • How do I prevent image hotlinking?
  • Setting headers with an .htaccess file
  • Using SSI on files with an .html extension
  • How to create a site maintenance message
  • How can I force a file to be downloaded?
  • How can I cache my site with an .htaccess file?
  • How can I control my directory indexes?
  • Redirect your root directory to a subdirectory

See also 

  • .htaccess overview

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?