Open jamieburchell opened 1 year ago
Thanks for opening this issue @jamieburchell. What about adding the following directive to the H5BP rewrite block?
RewriteOptions InheritDown
My concern would be that it has the potential to break existing configurations since it then becomes necessary to explicitly ignore inheritance where it would have been the default behaviour.
Indeed, you are right. Then yes, a commented out directive with a line or two docs would make sense in virtual host config templates. 👍
If you use the h5bp Apache config in a server configuration, and add a virtual host and a directory block with custom rewrite rules, none of the h5bp rewrite rules will work. This is because the new rewrite rules overwrite existing ones by default.
Do you think it's worth mentioning this anywhere?
E.g.
Let's say you have this (taken from h5bp) in your main config file:
You then create a virtual host configuration:
For blocking access to hidden files I prefer to use
Require all denied
with aLocationMatch
, but this is just an example.It strikes me that it's not immediately obvious that the rules from h5bp have no effect in certain situations. At least, it wasn't to me.
Ref: https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions