Add the below python handler to .htaccess to make apache parse Python .py scripts
AddHandler mod_python .py
PythonHandler test2
Add the below python handler to .htaccess to make apache parse Python .py scripts
AddHandler mod_python .py
PythonHandler test2
Looking to enable php4 in php5 based server
install php 4 first in server using easyapache and add the below code in .htaccess of your account to use php4
AddType application/x-httpd-php4 .html
AddHandler application/x-httpd-php4 .html
If you want to enable SSI in cpanel server using .htaccess use the below rule,
Options +Includes
AddType text/html .shtm
AddHandler server-parsed .shtml
AddType application/x-httpd-php .php .htm .html
<FilesMatch “\.(htm|html|php)$”>
SetHandler application/x-httpd-php5
</FilesMatch>
Add the above code in .htaccess
How to enable PHP4, PHP5 on same server .You do not need to do anything to enable PHP 5. It is already installed and ready to go on all of our hosting plans. To enable PHP 4, add the below code to your .htaccess file in the folder where you want the changes to apply.
AddHandler application/x-httpd-php4 .php
Use the below rules to parse php in html file
AddHandler application/x-httpd-php5 .html .htm
AddHandler cgi-script cgi PHP html
AddType application/x-httpd-php .php .htm .html
AddHandler x-httpd-php .php .htm .html
<FilesMatch “\.(htm|html|php)$”>
SetHandler application/x-httpd-php5
</FilesMatch>
Use below rewrite rule to access files which are converted from html to .shtml
RewriteRule ^(.*).html /$1.shtml [R=301,L]
AddType application/x-httpd-php .php .htm .html
AddHandler x-httpd-php .php .htm .html
<FilesMatch “\.(htm|html|php)$”>
SetHandler application/x-httpd-php5
</FilesMatch>
RedirectMatch 301 (.*)\.html$ http://www.domain.tld$1.shtml
Add the below rule in .htaccess for parsing html files and .shtml
AddType text/html .shtml .shtm .htm .html
AddHandler server-parsed .shtml .shtm .htm .html