2

The Apache documentation on IfModule states

The module name argument is the file name of the module, at the time it was compiled. For example, mod_rewrite.c. ...

However, Apache 2.2 seems to accept the module id too. So, these both work:

<IfModule mod_filter.c>

and

<IfModule filter_module>

Is that true for all Apache versions? Should the first version be prefered or does the second yield any benefits?

I'm asking because HTML5 boilerplate uses the module id instead of the filename

1 Answer 1

1

Apache 2.2 introduced the use of the module identifier as an option. See the documentation for 2.2.

4
  • Oh, how could I miss that... Jun 22, 2012 at 6:43
  • @ShaneMadden: that link actually states it got introduced with 2.1 and later. But perhaps it changed since you wrote this answer. Apr 15, 2016 at 12:55
  • 1
    @0xC0000022L Although 2.2 would be the first stable/production-ready version. The odd-numbered minor version numbers signify development-only versions.
    – MrWhite
    Aug 18, 2020 at 23:44
  • @MrWhite thanks, never knew. I know this scheme from others but I wasn't aware Apache was using it. Aug 19, 2020 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.