Search code examples
apacheconfigurationserver-side-includes

I'm having trouble following these instructions: http://httpd.apache.org/docs/1.3/misc/FAQ.html#ssi-part-i


I want my apache server to parse shtml files so I can include them in other html files, but I can't seem to understand how to modify the config files, even with these instructions: http://httpd.apache.org/docs/1.3/misc/FAQ.html#ssi-part-i

Could anyone provide really really specific instructions? Such as specifically what files to open, and where and how to add certain instructions.


Solution

  • In the directory where your index.html file is (and I assume your shtml file(s) are) create a file named ".htaccess" and put these three lines in that file:

    Options +Includes
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    

    Then test if server-side includes (SSI) are working.
    (reference: http://httpd.apache.org/docs/2.2/howto/ssi.html#configuring )
    You could also try the forums for the MAMP product you're using in case they've made any customizations to apache.