Hockeypuck Posted June 30, 2004 Share Posted June 30, 2004 I'm trying to get my .shtml files to act as .php files because I want to use SSI and php in the same document. I remember something about being able to do this through my .htaccess file, but I havn't been able to find something written in language that I can figure out to be able to do it. Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted June 30, 2004 Share Posted June 30, 2004 PHP, by default, will only execute PHP code if the file ends in .php. It simplifies things for the server if it only needs to monitor one specific file extension. If you login to your cPanel > Site Managment, you will see an option for Apache Handlers. On that page, add .html files to the PHP-executable list: in the window for Extensions: type .htm .html .shtml and in the Handler: window type application/x-httpd-php When you are done, you should see User Defined Handlers .htm .html application/x-httpd-php System Defined Handlers .cgi .pl cgi-script .shtml server-parsed With this information, the server should be able to execute your html HTML files as PHP. And search engines will not have a problem with missing pages. hope this helps. Quote Link to comment Share on other sites More sharing options...
Hockeypuck Posted June 30, 2004 Author Share Posted June 30, 2004 Well, it got me going anyway. But now, its only running the php and not doing the SSI. Is it possible to do this? --Edit-- Ok, I think I have it figured out. I just need to make a few changes to pages so that I'm using php calls for the navigation bar rather than SSI, that way I don't have to worry about getting both. Thanks for the help Don! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.