Question

What's the most efficient and logical way to order sections of a .htaccess file?

Was it helpful?

Solution

The order depends on what you want to express as the directives are applied in the order that they are found. But if possible, I’ll put sections that change often during development first so I’ll find them fast.

OTHER TIPS

If at all possible I would look at the most recent Apache release and pattern your htaccess layout on the apache.conf file seeing how .htaccess files are essentially an extension of the server configuration.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top