2008/03/12(水)
.htaccess ファイルを用いて、Webサーバ(Apach)における PHP その他の動作設定を変更することはよくあるが、大概サイト構築時の初期の段階において行い、あとは殆ど顧みることがないため、そのうちすっかり忘れてしまうものだ。そして毎回新しいサイトを作るたび、何だったっけ? と探し回るはめになるので、下記に記録。
DirectoryIndex sample.php index.php index.html
(先に記述したものほど表示の優先順位が上になる)
AddType application/x-httpd-php .html .htm
php_flag register_globals Off
php_flag track_vars On
php_flag display_errors Off
※ PHP の httpd オプションについては下記サイトに詳しい。
http://jamesthornton.com/php/japanese/configuration.directives.html
***
↓以下は、PHP じゃないけど、htaccess 関連としてついでに書いておくと
Options +Includes
AddType text/x-server-parsed-html .shtml .html .htm
(Options は SSI 実行可能領域を設定するのだが、もともと実行可なら必要なし)
※ httpd の設定に関する参考サイト
http://www.tagindex.com/other/htaccess.html
Filed under: Sample,Web Design | タグ: htaccess, PHP
Tail-Lagoon @ 16:03
コメントおよびトラックバック受付中です。
TB : http://weblogs.tail-lagoon.com/WebPC/2008/03/12/12/trackback/
この投稿へのコメントは RSS 2.0 フィードで購読できます。