.htaccess

Python handler for .htaccess

Add the below python handler to .htaccess to make apache parse Python .py scripts

AddHandler mod_python .py
PythonHandler test2

Comments Off more...

enable php4 in cpanel server

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

Comments Off more...

Enable SSI using .htaccess in cpanel server

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


Parse html in php file

AddType application/x-httpd-php .php .htm .html

<FilesMatch “\.(htm|html|php)$”>
SetHandler application/x-httpd-php5
</FilesMatch>

Add the above code in .htaccess

Comments Off more...

How to enable PHP4, PHP5 in same server

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

Comments Off more...

Rewrite rule to parse php in html

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>

Comments Off more...

rewrite rule to access .shtml files

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

Comments Off more...

rewrite rule for parsing .html as .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

Comments Off more...

Hillock's Wiki

Unlimited Hosting Solutions
  • Categories

  • Twitter Updates

    • Calendar

      February 2012
      M T W T F S S
      « Aug    
       12345
      6789101112
      13141516171819
      20212223242526
      272829  
    • SMS Text Message

      Phone number

      Carrier

      *Standard text messaging rates may apply from your carrier*
    • © 2011 Hillock Hosting. All rights reserved
      Jarrah theme by Templates Next | Powered by WordPress