HowTo: Comment out lines in a .htaccess file

The .htaccess file allows for directory-level configuration on Unix based web servers. You may use the .htaccess file on a website for authorisation and authentication, or for URL rewriting (changing mywebsite.com/fruit/bananas to mywebsite.com/fruit.php?fruit=bananas.) This feature allows the mechanics of your website to be hidden from the user and allows search engines to index your content more efficiently.

As with most configuration files, it becomes necessary to comment out lines and add comments to assist with maintaining the file.

To do this you need to add a hash (#) symbol at the start of each line.

Simples!

Share