html appears as text after transfer from another cpanel server

radicalrick

Member
May 1, 2003
5
0
151
I recently transfer several websites to a new server using WHM. Two of them display html as text in the browser. I copied one of the html files to another domain on same server and it displays as a webpage like it should. Is this a common problem and easily repaired?
 

radicalrick

Member
May 1, 2003
5
0
151
deleted .htaccess file, did not help.
I renamed index.html to index.htm and page displays correctly, not a fix but a Band-Aid and maybe a clue
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
Try to add following code in your .htaccess file if your are still facing the same issues with your other site

AddHandler application/x-httpd-php5 .htm
AddHandler application/x-httpd-php5 .html
 

radicalrick

Member
May 1, 2003
5
0
151
My Apology, I thought I deleted the .htaccess but after adding AddHandler application/x-httpd-php5 .html I noticed everything I thought was gone was still there. A fresh .htaccess file with server-parsed .html for includes and problem is fixed.

Thanks for all of your help
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

Thank you for updating this thread with the solution. I am marking this thread as [Resolved].