Thread View: fj.net.www.servers
1 messages
1 total messages
Started by 北沢
Thu, 06 Dec 2001 11:35
mod_rewriteにバグ? 仕様?
Author: 北沢
Date: Thu, 06 Dec 2001 11:35
Date: Thu, 06 Dec 2001 11:35
37 lines
2394 bytes
2394 bytes
北澤と申します。
apacheのモジュールである mod_rewrite を使っていて
少々気になった点があります。
ドキュメントディレクトリ配下で、例えば“/dir_1”
ディレクトリにおいてアクセス制御ファイル(.htaccess)に
単に
RewriteEngine on
RewriteRule ^(.*) /dir_2/$1 [R,L]
と書き、/dir_1/test_index.html にアクセスすれば正しく
http://SERVER_NAME/dir_2/test_index.html
が返されますが、あるファイルが要求された時だけリダイレクト
する為に、<Files ~>ディレクティブ内に
<Files test_index.html>
RewriteEngine on
RewriteRule ^(.*) /dir_2/$1 [R,L]
</Files>
のように記述し、/dir_1/test_index.html にアクセスすると、
http://SERVER_NAME/dir_2//usr/local/www/data/dir_1/test_index.html
のように、物理パスが返されてしまいます。
こういった内部的な(?)情報が返されてしまうというのは
あまり好ましくないと思いますが、これは既知の問題でしょうか?
当該マシンの環境は、
OS: FreeBSD 4.3-RELEASE
apacheのバージョン: Apache/1.3.22
( portsから作成した apache-1.3.22_4 )
です。
北沢 yotch@alles.or.jp
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads