質問編集履歴
2
fanctions.php記述を追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -39,6 +39,15 @@
|
|
39
39
|
|
40
40
|
このような記述も試してみましたがダメでした。
|
41
41
|
|
42
|
+
fanctions.phpに書くのも試しました。下記の通りです。
|
43
|
+
function force_https_redirect() {
|
44
|
+
if ( !is_ssl() ) {
|
45
|
+
wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 );
|
46
|
+
}
|
47
|
+
}
|
48
|
+
add_action ( 'template_redirect', 'force_https_redirect', 1 );
|
49
|
+
|
50
|
+
やはりダメでした。
|
42
51
|
何か解決策はありませんでしょうか?
|
43
52
|
|
44
53
|
### 補足情報(FW/ツールのバージョンなど)
|
1
試したことなど追記しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -28,8 +28,22 @@
|
|
28
28
|
上記の記述を大元や該当のサブディレクトリでhtaccessに記述しましたが、
|
29
29
|
繰り返しリダイレクトされていますというエラーが出てしまいます。
|
30
30
|
|
31
|
+
<Files ~ "^.(htaccess|htpasswd)$">
|
32
|
+
deny from all
|
33
|
+
</Files>
|
34
|
+
Options -Indexes
|
35
|
+
Redirect permanent http://大元URL/ https://大元URL/
|
36
|
+
Redirect permanent http://大元URL/サブ1/ https://大元URL/サブ1/
|
37
|
+
Redirect permanent http://大元URL/サブ2/ https://大元URL/サブ2/
|
38
|
+
order deny,allow
|
39
|
+
|
40
|
+
このような記述も試してみましたがダメでした。
|
41
|
+
|
31
42
|
何か解決策はありませんでしょうか?
|
32
43
|
|
33
44
|
### 補足情報(FW/ツールのバージョンなど)
|
34
45
|
|
35
|
-
|
46
|
+
大元に記載されているリダイレクトは下記の通りです。
|
47
|
+
RewriteEngine On
|
48
|
+
RewriteCond %{SERVER_PORT} 80
|
49
|
+
RewriteRule ^(.*)$ https://URL $1 [R,L]
|