jigen studylog » apache

jigen, Hirotomo Kunimatsu
Tokyo, Japan
mailto: microformat hcard
top

mod_rewriteを使うにはFollowSymLinksが必要

mod_rewriteを使うにはFollowSymLinksが必要タイトル通りだけど、つい昨日にハマったのでメモ。

URLの書き換えとかに利用するApacheの拡張であるmod_rewriteですが、Apacheの設定で「FollowSymLinks」設定がオフになっていると使えないようです。ただしmod_rewriteの設定を.htaccessから呼ぶ場合ね(ここ重要)。ちなみに、mod_rewriteマニュアルは下記。

と、上のリンクのマニュアルを読み進めていくと以下のような文章が・・・。

The rewrite engine may be used in .htaccess files. To enable the rewrite engine for these files you need to set “RewriteEngine On” and “Options FollowSymLinks” must be enabled. If your administrator has disabled override of FollowSymLinks for a user’s directory, then you cannot use the rewrite engine. This restriction is required for security reasons.

あら、マニュアルにも書いてあるわいな。あっちゃー。ま、ざっくり言うと「Options -FollowSymLinks」ではダメで「Options FollowSymLinks」とかにしないとダメって事です。

私信になっちゃいますが、サーバーの対応してもらったMさん。本当にスイマセンm(_ _)m

昔のエントリー


2008/05/22 12:13:27200812:13
ネズミ「ここからメニューだすよ」
ネズミ「ごちそういっぱーい」
ネズミ「腹へったー」
ネズミ「働けー働けー♪」