.htaccess File Reference List Updated on November 30, 2023 by InMotion Hosting Contributor 1 Minutes, 46 Seconds to Read The .htaccess files on your server are for making configuration changes to apache on a per directory basis. For more information on what the .htaccess is see our article on What is the .htaccess file and what do I use it for? The following is a list of articles that explain different uses for the .htaccess file. URL Rewriting and Redirects Setting up a 301 permanent redirect via .htaccess How to force www or non-www in htaccess How to redirect your website to its mobile version Redirecting visitors to an Under Construction page Security Restrict access with .htaccess and the IP Deny Manager Block unwanted users from your site using .htaccess How to prevent access to a specific file in htaccess How to prevent access to multiple file types in htaccess How to password protect a single file with htaccess How to block a country’s IP ranges in htaccess How to password protect a single file with htaccess Hotlink protect files in the .htaccess and cPanel Restrict public access to your php.ini Site Optimization and Performance An introduction to gzip / mod_deflate How to add Apache Module mod_expires in your .htaccess Using two different php versions on your server File Handling How can I make my php.ini file recursive ? Using Server Side Includes with HTML Files How to change your default Index page in htaccess Forcing a file to download in a browser via htaccess Removing file extensions from displaying in browser via htaccess How do I enable Hotlink Protection in cPanel? How do I execute PHP code in a HTML page? Error Handling Setting a 404 error page via .htaccess .htaccess Hacks Cleaning up a .htaccess hack Miscellaneous Activate Chrome Frame via .htaccess? How to change your default timezone in htaccess How to show hidden files (htaccess) when using cPanel’s File Manager .htaccess Errors and issues 403 Forbidden Error Can’t update PHP settings in .htaccess How do I delete the .htaccess file once I’ve extracted it? Why is order allow deny from all in my .htaccess file? Why is Joomla 3.0 not showing a custom error page? Do you support Mod_Rewrite? 500 Internal Server Error Share this Article Related Articles How To Create a PHP Redirect (301, 302, and Dynamic Redirect Examples) Connect to SFTP for Shared Hosting Accounts Using FileZilla FTP Basics for Dedicated Servers How to Install Jekyll and Launch a New Site How to Host AI-Prompt Generated Websites on Shared Hosting What is your default PHP.ini file? Getting Started Guide: FTP Configuring your site in WS_FTP Schedule Social Media Posts With Buffer FTP Error – 421 Too Many Connections