[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 2ch.scのread.cgiへ]
Update time : 02/23 23:57 / Filesize : 381 KB / Number-of Response : 998
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

【PHP】下らねぇ質問はここに書き込みやがれ 14



102 名前:デフォルトの名無しさん mailto:sage [2022/10/19(水) 15:41:31.30 ID:Js5Cj1j50.net]
>>101
当時の仕様は知らんが、今と変わりなければ、
nginxでは.htaccessは使えないし、ディレクトリインデックスはデフォでオフだから、まるで意味無いよ。
> If a request ends with a slash, NGINX treats it as a request for a directory and tries to find an index file in the directory. The index directive defines the index file’s name (the default value is index.html). To continue with the example, if the request URI is /images/some/path/, NGINX delivers the file /www/data/images/some/path/index.html if it exists. If it does not, NGINX returns HTTP code 404 (Not Found) by default. To configure NGINX to return an automatically generated directory listing instead, include the on parameter to the autoindex directive:
> https://docs.nginx.com/nginx/admin-guide/web-server/serving-static-content/#:~:text=The%20index%20directive%20defines%20the%20index%20file%E2%80%99s%20name,returns%20HTTP%20code%20404%20%28Not%20Found%29%20by%20default.
フールプルーフを目指すなら、Apacheとnginxの両方の設定ファイルもちゃんと用意しておけばいいだけ。
.htaccess置くのなら、Options でディレクトリインデックスも切れるはずだし、グダグダすぎる。

まあ歴史は長いようだから、大抵何らかの理由があるものではあるけど、
見た目、単なる技量不足(鯖を知らないだけ)で、初心者的なコーディングをしてしまったように見える。
そうでなければ、鯖がグダグダ過ぎて設定してもまともに動かなかったのでPHP側で対応した、てなところだろう。






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧](;´∀`)<381KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef