|
#1
|
|||
|
|||
|
We recently moved to Host Gator. Some of our web pages have PHP code in them even though they are using the html extension. This works fine under dreamweaver and on our old host's servers. Is there a way to allow PHP code in an HTML file on Host Gator? Thanks!
|
|
#2
|
||||
|
||||
|
add the following to the .htaccess file for the website
Code:
AddHandler application/x-httpd-php .html .htm |
|
#3
|
||||
|
||||
|
I'm not aware of any way except to reconfigure the server script handlers so that all *.html files were treated as potential PHP scripts. Wouldn't it be simpler just to rename your files that contain PHP code with a *.php filename extension. It won't affect normal processing of their HTML content.
|
|
#4
|
|||
|
|||
|
The line:
AddHandler application/x-httpd-php .html .htm Did not work, that I can tell. The HTML pages containing PHP are referred to from various unknown locations. Renaming them as .php works but not for all of the places they are called from. |
|
#5
|
||||
|
||||
|
Try:
Code:
AddHandler application/x-httpd-php5 .htm .html |
|
#6
|
|||
|
|||
|
THANKS! It works now.
|
|
#7
|
||||
|
||||
|
This sounds kind of backwards to me ...
__________________
Jim, AKA usa2k VOIPo user, HostGator fan, DSLReports.com regular. Folding@Home, Team#4, and Foldinator Project. FAH-Tool, Progressive Tactics, usa2k, ... VoIP |
|
#8
|
|||
|
|||
|
It is called 'inherited stuff'. Who knows who did it years ago. It worked then so they ignored it. Now it is too much work to fix it and we need to write a new web site anyway.
|
|
#9
|
||||
|
||||
|
Well, that could be solved with 301 redirects, but it really comes down to whatever works best for you.
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Need Help] I can't run php code on html | ice888 | Shared Hosting Support | 10 | 04-15-2010 03:44 PM |
| HTML Help. | IronWarrior | Webhosting | 4 | 01-15-2008 05:49 PM |
| Content-type: text/html appearing at top of index.html page | acketon | Shared Hosting Support | 4 | 07-21-2007 11:35 AM |
All times are GMT -5. The time now is 10:21 PM.










