I am trying to display a simple php code on my website. All my files use .stml as extensions and these don't seem to display even a simple php code like: <html> <body><?php echo "Hello World"; ?></body> </html> I am on a windows plan therefore can't use .htaccess to fix this (my host says). I have had a look at Mime but it seems like it is not the way to go as there is not Mime type for php, apparently. MIME TYPES Sorry for my naivity I am trying to learn PHP... The last resort would be to change all my files extensions to .php but it will hurt my ranking for a while and I can't afford this. Is there a savior over here?? Rep to anyone who help me sort this out
Ask your host to allow Apache to send .shtml requests to php parser. open httpd.conf. search for "AddType application/x-httpd-php" (without quotes) and add .shtml after .php AddType application/x-httpd-php .php .shtml
Does this have anything to do with MIME? I can't find httpd.conf. . I will have to argue with my host again and they will get back to me saying that I am on a shared server and can't process my request... </
No. You can find httpd.conf file in 'conf' directory under your apache installation. It's Better to change your hosting.....
Thanks for your help mate but I can't find any of this. I am on a shared windows server so that may be the reason why... I have had a chat with support and they told me .shtml and .php where not recommended on windows and that I should move to a unix server. He also told me it was not possible to for .sthml files to parse php. I don't know what to make of this. I am going to use SSI like so, <!--#include virtual="/myfile.php" --> the php files will be processed server sides and return html which should be displayed regardless of my .sthml file extension Hope for the best!