About .htaccess
The .htaccess file provides a way to give instructions to the Apache and compatible web servers. Caching instructions are often placed in .htaccess. One interesting property of .htaccess is that it reads instructions from top to bottom. If an instruction at the top is contradicted by one farther down, the last one to be read will be the one that is used. This allows us to turn off caching without disturbing any existing instructions simply by putting new instructions at the bottom. When site updates are finished, our additional instructions can be deleted to return the site to normal operation.Disabling caching
Add this code at the bottom of the .htaccess file to turn off caching. Delete the code to turn caching on again.Related articles
- Editing .htaccess files
- Configuring caching with the mod_expires module
- Enabling caching on Turbo servers
- Enabling PHP opcode caching
- Setting the magic quotes directive in an .htaccess file
- Setting the max_input_vars directive in an .htaccess file
- Enabling and disabling PHP error logging using an .htaccess file
- PHP error message settings in an .htaccess file