質問編集履歴

1

問題発生状況を整理し加筆しました。

2016/11/16 12:03

投稿

deletekey
deletekey

スコア14

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,44 @@
1
1
  静的htmlで構築していたサイトをWordpressで再構築しています。
2
2
 
3
3
 
4
+
5
+ ###パーマリンク名と同じファイル名のhtmlがある場合404エラーになる
6
+
7
+ 静的htmlの **http://examples.jp/contact.html** がある状態で、
8
+
9
+ パーマリンクを **http://examples.jp/contact/** にした固定ページが404エラーになります。
10
+
11
+ - http://examples.jp/contact/ → 404エラー
12
+
13
+ - http://examples.jp/contact.html → htmlが表示
14
+
15
+ - http://examples.jp/contact → htmlが表示
16
+
17
+
18
+
19
+ ちなみに、同名の静的htmlがない場合は正しく表示されます。
20
+
21
+
22
+
23
+ - http://examples.jp/contact**2**/ → Wordpressの内容が表示
24
+
25
+
26
+
27
+ 解決方法はありますでしょうか?
28
+
29
+
30
+
31
+ ###環境
32
+
33
+ - Wordpressバージョン4.6.1
34
+
35
+ - ロリポップ!レンタルサーバー使用
36
+
37
+
38
+
39
+
40
+
41
+ ###※下記、修正前でも状況は同じでしたので今回の問題とは関係ないようでした。
4
42
 
5
43
  同じサーバーの同じ階層に**index.html**と**index.phpが**共存しています。
6
44
 
@@ -13,29 +51,3 @@
13
51
  $redirect['path'] = preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/*?$|', '/', $redirect['path']);
14
52
 
15
53
  ```
16
-
17
-
18
-
19
- ###下層ページの共存が失敗する
20
-
21
- しかし、静的htmlの **http://examples.jp/contanct.html** がある状態で、
22
-
23
- パーマリンクを **http://examples.jp/contanct/** にした固定ページが404エラーになります。
24
-
25
- - http://examples.jp/contanct/ → 404エラー
26
-
27
- - http://examples.jp/contanct.html → htmlが表示
28
-
29
- - http://examples.jp/contanct → htmlが表示
30
-
31
-
32
-
33
- 解決方法はありますでしょうか?
34
-
35
-
36
-
37
- ###環境
38
-
39
- - Wordpressバージョン4.6.1
40
-
41
- - ロリポップ!レンタルサーバー使用