Jump to content

.shtml Acting Job


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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! :unsure:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...