make a custom apache handler (for multiple php versions)

Posted by user10580 on Pro Webmasters See other posts from Pro Webmasters or by user10580
Published on 2012-12-13T15:13:58Z Indexed on 2012/12/13 17:17 UTC
Read the original article Hit count: 248

Filed under:

ive succesfully installed php 5.2 and it runs as CGI.

ultimatly i want to put something like AddHandler application/x-httpd-php52 in the htaccess file of the dir i want to run it on.

however, this only really works in the virtual hosts because i cant wrap my head around how to deifne a custom handler.

<FilesMatch "\.php">
SetHandler application/x-httpd-php5
</FilesMatch>
ScriptAlias /php52-cgi /usr/lib/cgi-bin/php52-cgi
Action application/x-httpd-php5 /php52-cgi
AddHandler application/x-httpd-php5 .php

How can i do somthing like AddHandler application/x-httpd-php52 in the htaccess?

© Pro Webmasters or respective owner

Related posts about htaccess