Examples of .htaccess for popular CMSs: how to restore the default file
· Leitura de 13 minutos

The .htaccess file is a configuration file used on Apache web servers to manage website settings without access to the server’s main configuration. With it, you can enable redirects, restrict access, configure SEO-friendly URLs, set up caching, and much more—directly from the root of your site or any of its directories.
Many CMSs automatically create this file on installation or include a sample in the distribution.
If you're working with hosting, especially on Apache, it's important to know what the default .htaccess looks like for different CMSs. This helps you:
-
Check that everything is correct after installation;
-
Restore the file if it was accidentally deleted;
-
Understand what rules the system uses “out of the box”.