Htaccess and addhandler problem

.htaccess

htaccess addhandler not working when changed.

  1. Main site.com – is running php4
  2. sub.site.com – needs to run php5 i've added in the following Addhandler:

    AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml .tpl .html

    AddHandler application/x-httpd-php .php .tpl .html .phtml

no luck on any of those.
3. i added a test.php with phpinfo() on the sub.site.com and its reading php4…
4. went to the Main site.com and removed the Addhandler for php4 retested the test.php on sub.site.com and it read php5 (which is the system default) the script also loaded perfect fine.

for some reason the htaccess under Main site.com is effecting the entire domain. why would something like this happen?

Best Answer

Yes you can only load one php module. When you want to set the Handler in .htaccess for different php versions you should run fastcgi with the different modules.

Here is a short manual HowToForge

Related Topic