回答編集履歴
1
folder/\.htaccess に分ける設定を追記
test
CHANGED
@@ -33,3 +33,53 @@
|
|
33
33
|
```
|
34
34
|
|
35
35
|
※RewriteRule の第1引数にはパスを設定します。プロトコル(http://)やホスト名は設定できません。
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
###(2016/03/04 18:55 追記)
|
40
|
+
|
41
|
+
「CSSや画像が読み込まれない状態」はおそらく WordPress 用のルールにマッチしてしまっているのだと思います。
|
42
|
+
|
43
|
+
.htaccess の一部を folder/.htaccess 以下に移すとどうでしょうか。
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
(.htaccess)
|
48
|
+
|
49
|
+
Redirect permanent /folder/ https://www.second-domain.com/
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
# BEGIN WordPress
|
54
|
+
|
55
|
+
RewriteEngine On
|
56
|
+
|
57
|
+
RewriteBase /
|
58
|
+
|
59
|
+
RewriteRule ^index\.php$ - [L]
|
60
|
+
|
61
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
62
|
+
|
63
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
64
|
+
|
65
|
+
RewriteRule . /index.php [L]
|
66
|
+
|
67
|
+
# END WordPress
|
68
|
+
|
69
|
+
```
|
70
|
+
|
71
|
+
```
|
72
|
+
|
73
|
+
(folder/.htaccess)
|
74
|
+
|
75
|
+
RewriteEngine On
|
76
|
+
|
77
|
+
RewriteCond %{HTTP_HOST} ^www\.second-domain\.com$
|
78
|
+
|
79
|
+
RewriteCond %{HTTPS} off
|
80
|
+
|
81
|
+
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
|
82
|
+
|
83
|
+
```
|
84
|
+
|
85
|
+
|