LoginSignup
0
0

More than 3 years have passed since last update.

MAMPでSSIを使ってみる

Last updated at Posted at 2020-10-23

背景

複数のWEBアプリを作成すると似たような機能がある。再利用を見据えてSSIにてファイル分割を行う

実施

  • "C:\MAMP\conf\apache\httpd.conf"の Directory "C:\MAMP\htdocs" のOptions にIncludesを追加 AllowOverrideはAllになっていることを確認
<Directory "C:\MAMP\htdocs">
    # Options Indexes FollowSymLinks ExecCGI
    Options Indexes FollowSymLinks ExecCGI Includes
    ----省略---
    AllowOverride All
    ----省略---
</Directory>
  • IfModule mime_moduleにAddTypeとAddOutputFilter INCLUDESを追加
<IfModule mime_module>
    ----省略---
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml .html .htm .php
</IfModule>

参考

Webサイト制作におけるインクルード化とは?基本と設定方法
「分かりそう」で「分からない」でも「分かった」気になれるIT用語辞典 SSI
MAMPの設定(SSIや複数のローカルホスト)
もっとhttpd.confの設定
MIMEタイプの追加(AddType)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0