in reply to problem with if condition
If you're using Apache, IIRC, you can simplify things by doing the same thing (or similar) in /etc/httpd.conf.