質問編集履歴

1

修正

2019/03/13 08:43

投稿

Roo
Roo

スコア55

test CHANGED
File without changes
test CHANGED
@@ -28,15 +28,13 @@
28
28
 
29
29
  //ここでページ指定↓
30
30
 
31
- ErrorDocument 403 http://~~~/403.php
31
+ ErrorDocument /403.php
32
32
 
33
- ErrorDocument 500 http://~~~/500.php
33
+ ErrorDocument /500.php
34
34
 
35
35
 
36
36
 
37
- //500を発生させるためのテスト方法
38
37
 
39
- Allow from 500
40
38
 
41
39
  ```
42
40
 
@@ -46,33 +44,31 @@
46
44
 
47
45
  ●500エラーページ確認方法
48
46
 
47
+ php ファイルにて
48
+
49
+
50
+
49
- .htaccessにて、`Allow from 500`と適当な値入れています
51
+ // 現在のレスポンスコード取得し、新しコードを設定します
52
+
53
+ var_dump(http_response_code(404));
54
+
55
+
56
+
57
+ // 新しいレスポンスコードを取得します
58
+
59
+ var_dump(http_response_code(500));
60
+
61
+
50
62
 
51
63
  ### 発生している問題
52
64
 
53
- .htaccessで指定したペジに遷移せずに
65
+ ステタスコード500で返ってきていますが
54
66
 
55
- さくら側で用意している500の画面に飛んでしまいます
67
+ 500の画面に遷移しません
56
68
 
57
- ↓↓500エラー
58
-
59
- ```500
69
+ 上記時実施。
60
-
61
- Internal Server Error
62
-
63
- The server encountered an internal error or misconfiguration and was unable to complete your request.
64
70
 
65
71
 
66
-
67
- Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
68
-
69
-
70
-
71
- More information about this error may be available in the server error log.
72
-
73
-
74
-
75
- ```
76
72
 
77
73
  ### 質問点
78
74