I’ve recently had to put some code into a different server and my .htaccess file fails miserably. I can stripe out all the parts I don’t need but the thing is I’d like to have it on source-control (one file serves many scenarios).
Can we have fail-safe rules? I think I’m looking for an if else clause here.
# IF THIS IS ALLOWED DO IT #
AuthType none
Satisfy any
# IF THIS IS ALLOWED DO IT #
DirectoryIndex index.htm index.php
AddHandler php5-script .php
I think there is an <IfModule> thing in htaccess:
but I don’t think there is an module for
AuthType… TheIfModule !mod_a.cchecks if mod_a.c NOT exists.However, I don’t know if there are version checks and try-catches.