Add Server Side Includes to your MAMP Localhost

Super simple edit the file:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual”]

pico /Applications/MAMP/conf/apache/httpd.conf

[/pastacode]

Uncomment the following:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual”]

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

[/pastacode]

Then add an .htaccess file to your root:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual”]

AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes

[/pastacode]

Restart MAMP and it should work like a charm!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.