Apache Handlers, running html as php
Apache handlers allow you to control what Apache will do with certain file types. When Apache sees a file, it has an action built in for that file type, and will perform that action.
If you wish Apache to do a different action, you will need to make a handler to tell Apache to perform that action. For example, if you use a file type that requires a special service to run it, such as a file with server side includes that is not named with a .shtml extension, you need to tell Apache to treat these files differently.
To get regular html pages to handle php code, you need to add this line to your htaccess file.
AddHandler application/x-httpd-php5 .html .htm
It is highly recommended that you never allow html pages to automatically handle php or shtml, because this forces all of your html pages to be processed by the server first. Instead, please rename your files to .php or .shtml whenever possible.
System Mime Type defaults
Handler Code File Extensions
image/vnd.djvu djvu djv
application/perl pl plx ppl perl pm
application/x-director dcr dir dxr
application/xhtml+xml xhtml xht
image/jpeg jpeg jpg jpe
text/plain asc txt
audio/x-pn-realaudio ram rm
video/mpeg mpeg mpg mpe
application/x-httpd-php phtml php php3 php4 php5 php6
image/tiff tiff tif
application/xml xml xsl
model/iges igs iges
text/calendar ics ifb
application/smil smi smil
audio/mpeg mpga mp2 mp3
audio/basic au snd
text/sgml sgml sgm
application/x-tar tgz tar
model/mesh msh mesh silo
audio/x-aiff aif aiff aifc
video/quicktime qt mov
text/x-config cnf conf
application/x-troff t tr roff
audio/mp4 a-latm m4p m4a mp4
text/html html htm shtml
audio/midi mid midi kar
application/x-koan skp skd skt skm
application/x-netcdf nc cdf
model/vrml wrl vrml
application/postscript ai eps ps
application/x-texinfo texinfo texi
application/octet-stream bin dms lha lzh exe class so dll iso dmg
Was this answer helpful?
IN2HOSTING uses a maildir system, which means that all your email boxes and messages are stored...
MySQL queries or tables stop working If you get an error which says, "so-and-so is marked as...
Forgot your database's password? You must create a new user with a new password. Do not worry,...
Is there a way for me to copy an entire database in cPanel? 1.Go to cPanel > MySQL Databases...
Internal server errors can be caused by a few different things. Please check the Error Logs in...