Enable .shtml extensions
Posted by: TheKillerR (---.rdsnet.ro)
Date: March 29, 2010 02:34AM

I Just tryed to open a .shtml extension and it opens it as text not as a normal html file
how may i fix it?

Re: Enable .shtml extensions
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: March 29, 2010 07:56PM

You need to configure Apache for Server Side Includes (what .shtml files are used for).

Link to manual for SSI
[httpd.apache.org]

Re: Enable .shtml extensions
Posted by: TheKillerR (---.rdsnet.ro)
Date: March 29, 2010 08:50PM

ok fixed it with this .htaccess code

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Thanks

Re: Enable .shtml extensions
Posted by: JCSullivan (---.home.cgocable.net)
Date: April 30, 2010 05:59PM

I'm new to this WAMP server business and I am NOT technical at all.
As others, I'm trying to test SSI on a local machine but having no success.

I've tried the conf file as others have suggested as well as tried to understand the manual (link above). Truly I am confused - usually, doing as a parrot, I succeed.

So please, would someone tell me where I can find the .htaccess file and what exactly I should have in it? I think it's

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Should I also have (below) because that's what I can't for the life of me figure-out where to write it.
Options +Includes

Thanks for ANY help.
j

Re: Enable .shtml extensions
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: April 30, 2010 06:41PM

Just create a file called .htaccess in WAMP's WWW folder (eg: C:/wamp/www) and copy and paste the followings lines into that file.

# Enable Server Side Includes
Options +Includes

# Configure file extensions for SSI
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

NOTE: Make sure you create the .htaccess file through Notepad first. Just open Notepad and choose File > Save As. In the file name box type the following (including the quotes)
"C:/wamp/www/.htaccess"
Click Save and the file will be created.

Re: Enable .shtml extensions
Posted by: JCSullivan (---.home.cgocable.net)
Date: April 30, 2010 08:18PM

First of all, thanks for the quick reply c2dan.

I did exactly as told and Restarted all services just as an extra step. Unfortunately still doesn't recognize the shtml.

Maybe it will work when I reboot? What do you think?
Thanks again for your time.

Re: Enable .shtml extensions
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: May 01, 2010 12:12AM

What do you mean by Unfortunately still doesn't recognize the shtml.

To run your .shtml files you'll need to go to [localhost]. Opening your .shtml file directly into your web browser will not work.

Re: Enable .shtml extensions
Posted by: JCSullivan (---.home.cgocable.net)
Date: May 01, 2010 02:52PM

Thank you once again c2dan.
My frustration got the best of me and replied without thinking.

I do go to localhost in the browser and when I get to "Your projects" in the WampServer menu I go to that "website" and then click on the index.shtml

Index DOES open but the include page does NOT. I've tested this externally and it works so I must be doing something wrong locally.

In addition to the .htaccess file in the root of the local host, should I un-remark the two lines (below) in the httpd.conf and should I check the Apaache module include_module ??

Thank you again for your patience and assistance.
j

Sorry, only registered users may post in this forum.