少し前に、誰かが Web サイトからあなたのコンピュータのファイル システムにアクセスできる方法を読んだことを覚えています。その方法を知りたいので、テストして発生を防ぐことができます。
XAMPP 経由で Windows で Apache 2.4 を実行する
私の仮想ホストは次のように設定されています:
<VirtualHost *:80>
ServerName local.scrap
DocumentRoot "D:/Dropbox/www/scrap/public_html/"
<Directory "D:/Dropbox/www/scrap/">
Order allow,deny
Allow from all
Require all granted
</Directory>
ErrorLog "D:/Dropbox/www/scrap/logs/error.log"
</VirtualHost>
index2.html
中scrap/
とindex.html
中がありますscrap/public_html/
ホストは次のように設定されています127.0.0.1 local.scrap
URLhttp://local.scrap/
を入力すると、index.html が表示されます。URLを入力http://local.scrap/../index2.html
すると、リダイレクトされますhttp://local.scrap/index2.html
../ URL が DocumentRoot パスにリダイレクトされるのはなぜですか?