回答編集履歴
1
追記
answer
CHANGED
@@ -6,4 +6,10 @@
|
|
6
6
|
RewriteRule ^(js/.*) /test/sample/$1
|
7
7
|
```
|
8
8
|
ドキュメントルート直下に、別の`css`や`js`ディレクトリがあるとそれらも全部リライトするので、
|
9
|
-
その場合はリファラーを見るなどが必要です。
|
9
|
+
その場合はリファラーを見るなどが必要です。
|
10
|
+
|
11
|
+
```Apache
|
12
|
+
RewriteEngine on
|
13
|
+
RewriteCond %{HTTP_REFERER} ^https://example.com/test/sample/
|
14
|
+
RewriteRule ^((css|js)/.*) /test/sample/$1
|
15
|
+
```
|