How to resolve "IfModule not allowed here" errors