UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Web Hosting and Domains > PHP Hosting

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 28-02-2008, 07:47
new member
 
Join Date: Feb 2008
Location: Herne Bay, Kent
Posts: 4
Default Enable .html to be processed as .php

Hi,

I always like to change the application/x-httpd-php entry so that that .html files are included.

My question is this, it mentions in my control panel that "you can not alter the system defined mime type values" but does that mean if I add a new custom entry for .html and configure it to use application/x-httpd-php that it will work?

If not, does anyone now how I can achieve my goal?

Many thanks in advance.
__________________
Experience is something you gain just after you need it.
Reply With Quote
  #2 (permalink)  
Old 29-02-2008, 06:13
Rock's Avatar
System Administrator
 
Join Date: Dec 2006
Posts: 521
Thumbs up

Quote:
Originally Posted by gmackman View Post
Hi,

I always like to change the application/x-httpd-php entry so that that .html files are included.

My question is this, it mentions in my control panel that "you can not alter the system defined mime type values" but does that mean if I add a new custom entry for .html and configure it to use application/x-httpd-php that it will work?

If not, does anyone now how I can achieve my goal?

Many thanks in advance.
Yes, the method you mentioned above will work If it throws any error, you can always make changes in your domain's ".htaccess" file to achieve your goal
__________________

Rock _a.k.a._ Jack L.

http://www.eUKhost.com
Windows Hosting || Windows Reseller Hosting
Reply With Quote
  #3 (permalink)  
Old 29-02-2008, 07:49
new member
 
Join Date: Feb 2008
Location: Herne Bay, Kent
Posts: 4
Default

Hi Rock,

Thanks for the reply but it does seem to work if I add the entries to the .htaccess file or through the control panel. (The control panel updates the .htaccess file by the way)

I have tried the following with no success:
AddType application/x-httpd-php htm html

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

I wanted to test that it worked at all so tried the following test that did allow .gm to be parsed as html but is of no help to me.

Adding AddType text/html gm

I think it might be easier to add the entry into the httpd.conf file unless you know something else?
__________________
Experience is something you gain just after you need it.
Reply With Quote
  #4 (permalink)  
Old 01-03-2008, 05:32
Rock's Avatar
System Administrator
 
Join Date: Dec 2006
Posts: 521
Thumbs up

Hi,

Yes, you are right, there's a script in '/usr/local/cpanel/bin/' named 'update_php_mime_types' which is run automatically during several cPanel installations or updates. It will either update or remove PHP AddHandler directives in .htaccess files to three levels deep within users home directories. To prevent this update from occurring, create a file named '/var/cpanel/easy_skip_update_php_mime_types'.

If you are on a shared account, I'd recommend you to open up a ticket with our support dept to get your issue sorted out quickly. If you have a VPS or a Dedicated server [SSH access], you can get the .htaccess file chattr'd so that no changes are done to it even after the above mentioned [cPanel updater] scripts are run... Let me know if I can be of any further help..
__________________

Rock _a.k.a._ Jack L.

http://www.eUKhost.com
Windows Hosting || Windows Reseller Hosting
Reply With Quote
  #5 (permalink)  
Old 03-03-2008, 13:31
mephisto's Avatar
Member
 
Join Date: Feb 2007
Location: Darlington
Posts: 99
Send a message via ICQ to mephisto Send a message via MSN to mephisto
Default

I don't know if mod_rewrite is available, but if so then you can set the handler with that

Code:
RewriteEngine On
RewriteRule ^(.+\.html?)$ $1 [QSA,T=application/x-httpd-php]
Reply With Quote
  #6 (permalink)  
Old 05-03-2008, 11:30
new member
 
Join Date: Feb 2008
Location: Herne Bay, Kent
Posts: 4
Default

Thanks for all of your input, i will create a ticket as I am on a shared solution.

Thanks again.
__________________
Experience is something you gain just after you need it.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 19:09.

 

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

knowledgebase articles

popular blog categories