Hello friends, I've an established website. All the files have .html extension. Now I want to enable SSI (server side includes) because this site contains too many pages and updating is painful task. My website is hosted on Apache server. SSI works if I give .shtml extension to my files. Since this is an established website I can’t change the file name to .shatml I heard that SSI function can be enabled even without .shtml file extension. Please help me Thanks Mahesh
From my understanding it's not possible. A workaround would be to add a line in your .htaccess to read PHP code on html pages, so then you can just use PHP includes and achieve the same thing.
from my own direct experience it works - my host had SSI enabled for all .*htm* extensions - hence also NON-shtml and I used it successfully for years until months ago when i switched to PHP included site-wide it normally should work with the following 2 lines in your .htaccess AddType text/html .html .htm AddHandler server-parsed .html .htm IF however later you want to use PHP includes THEN either site-wide OR in that particular subfolder you would have to REMOVE the a.m. handler again
It is a not particularly good idea to parse all files as SSI. It just puts extra load on the server. If you are not able/willing to convert file names to the shtml extension, use the XBitHack. With XBitHack on, either in httpd.conf or in an .htaccess file, you need only chmod +x filename for each file that actually has includes. Only those .html files with the x-bit set will be server parsed. cheers, gary
I've heard others say this as well with parsing PHP. I never noticed any considerable difference in load times though.
Ok, I'm a newbie and I am afraid of files that start with a dot (e.g., .htaccess). Happily, I found a widget on my hosting company's CPANEL admin page called Apache Handlers I just added a handler: server-parsed .html Ba-da-bing. Of course, I know I have added a performance hit. Someday I might re-investigate that bithack thing mentioned above. SSI is just too much of a productivity gain for me to give it up.