How to make MAMP recognize the .shtml extension and read server-side includes

Update (24 August 2011): Due to my recent “restart,” I wanted to see if these instructions still work with MAMP 2.0.1. I followed them as written and was able to get server-side includes working the first time with no issue.

Making MAMP recognize server-side includes is simple:

  1. Stop the MAMP servers.
  2. Open MAMP's httpd.conf (located at /Applications/MAMP/conf/apache/httpd.conf) in a plain text editor.
  3. Find the line DirectoryIndex index.html index.php and change it to DirectoryIndex index.shtml index.html index.php
  4. Uncomment the following two lines: AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
  5. Find the lines <Directory />
    Options Indexes FollowSymLinks
    AllowOverride All
    </Directory>
    and change to <Directory />
    Options Indexes FollowSymLinks
    Options +Includes
    AllowOverride All
    </Directory>
  6. Restart the MAMP servers.