1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

404ページが返す(/から と httpから)

Last updated at Posted at 2013-09-24

カスタムエラーレスポンスより、問題やエラーが発生した時の動作として、Apacheに以下の4つのうち一つの動作を設定することができる

  1. Apache 標準の簡単なエラーメッセージを表示
  2. 自分で指定したメッセージを表示
  3. 問題やエラーの処理をする為に、自サーバ内の URL-path へリダイレクト
  4. 問題やエラーの処理をする為に、外部の URL へリダイレクト(最終のステータスコードが、200だ)

ユーザ向け、1番目が、理解にくくて、2番目が表現悪い。
4番目が、ユーザ向けに問題がないけど、検索エンジンに対して、200戻って、記録されたので、悪い。

  • ErrorDocumentを絶対URLで書くのはやめようよ
    3番目が、一番よい設定はずだ。しかし、404ページが戻るため、そのページに、相対パスを使わないようにしないといけない。絶対パスで、CSSとか、JSとか設定する
    例: /ja/path1/path2に、エラー発生すると、、/ja/404.htmlにCSSファイルが戻らない
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?