The next step, of course, was to replicate this to other servers for other projects of his, and that’s where we ran into a small snag. No matter what we did, the PHP code just didn’t want to run. MOD_PHP was installed, we had the same .htaccess defined, permissions were right – it just didn’t look like Apache server was sending our code to the PHP processor at all. Well, that turned out to be exactly the problem.
The new sites had been created as virtual domains and the web “control panel” that created the virtual domains had added a
VirtualHost section to Apache’s httpd.conf file, with
DocumentRoot entries, but to have that .htaccess file read and acted upon we also needed a section for our directory as well, with an
<virtualhost> ServerName virtualdomain.domain.tld ServerAlias www.virtualdomain.domain.tld DocumentRoot /var/thevirtualdomain </virtualhost> <directory /var/thevirtualdomain> AllowOverride FileInfo </directory>
Thanks to Lance B. for helping us find that.