回答編集履歴

1

追記

2019/10/20 23:59

投稿

TaichiYanagiya
TaichiYanagiya

スコア12146

test CHANGED
@@ -11,3 +11,33 @@
11
11
  RewriteRule ^old/(.*) new/$1 [R=301,L]
12
12
 
13
13
  ```
14
+
15
+
16
+
17
+ ---
18
+
19
+ **(2019/10/21 08:59) 追記**
20
+
21
+
22
+
23
+ 「(サイトA のドキュメントルート)/site-b/」が存在しないとのこと。
24
+
25
+ では、トップの .htaccess の最初でリダイレクトするとどうでしょうか?
26
+
27
+ .htaccess の他の部分がわからないので、悪影響があるかもしれません。
28
+
29
+ ```
30
+
31
+ <IfModule mod_rewrite.c>
32
+
33
+ RewriteEngine On
34
+
35
+ RewriteRule ^site-b/old/(.*) site-b/new/$1 [R=301,L]
36
+
37
+ RewriteCond %{HTTP_HOST} ^(www.site-b.com)(:80)? [NC]
38
+
39
+ RewriteRule ^(.*) https://site-a/site-b/$1 [R=301,L]
40
+
41
+ </IfModule>
42
+
43
+ ```