Hello I need help for writing a .htaccess file. (1) My server is running PHP5 as apache2 module (2) I did also install PHP4 as cgi Both PHP versions suhoshin ones... (3) When I want to run PHP4 in a specific folder I use this .htaccess: Code: AddHandler php-script .php Action php-script /cgi-bin/php4 So, let's say I have a folder /var/www/webX/html/ that runs on PHP4 because of the .htaccess in there, how can I then make a subfolder of it to use PHP5 again (e.g. /var/www/webX/html/pwg/)?
I haven't tested this, but you could try to delete the .htaccess file and use something like Code: <DirectoryMatch "^/var/www/webX/html$"> AddHandler php-script .php Action php-script /cgi-bin/php4 </DirectoryMatch> in the vhost configuration. The $ at the end of the regex should make sure that only /var/www/webX/html matches the regex.