IfDefine and IfModule not Supported

If you are used to using ''IfDefine'' or ''IfModule'' with Apache, you will notice that these conditionals behave differently with LiteSpeed. For example:

<IfDefine ConditionToCheck>
   RewriteRule (.*) https://google.com [R=301,L]
</IfDefine>

This is because LiteSpeed doesn't support IfDefine and IfModule.

LiteSpeed will ignore such conditional checking and will always execute the directives enclosed within IfDefine or IfModule.

We do not recommend using IfDefine or IfModule. If you already have such conditionals in use, and you'd like a work-around to allow you to bypass them on LiteSpeed, manually add ConditionToCheck (should be replaced by your actual definition or module name) to the Ignore Apache Modules area.

  • Admin
  • Last modified: 2019/10/31 17:49
  • by Lisa Clarke