質問編集履歴
11
タグ
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
10
文字修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
以下のこれが問題です。
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
ポイント
|
6
10
|
|
7
11
|
```htaccess
|
8
12
|
|
@@ -26,7 +30,7 @@
|
|
26
30
|
|
27
31
|
```
|
28
32
|
|
29
|
-
|
33
|
+
全体
|
30
34
|
|
31
35
|
```htaccess
|
32
36
|
|
9
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,30 @@
|
|
1
1
|
wordpressから自作サイトにrewriteしたい。
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
以下のこれが問題です。
|
6
|
+
|
7
|
+
```htaccess
|
8
|
+
|
9
|
+
<IfModule mod_rewrite.c>
|
10
|
+
|
11
|
+
RewriteEngine On
|
12
|
+
|
13
|
+
RewriteBase /
|
14
|
+
|
15
|
+
RewriteRule ^index.php$ - [L]
|
16
|
+
|
17
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
18
|
+
|
19
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
20
|
+
|
21
|
+
#RewriteRule . /index.php [L]
|
22
|
+
|
23
|
+
RewriteRule ^index.php/(.*) /some-other-dir/aaa/$1 [L]
|
24
|
+
|
25
|
+
</IfModule>
|
26
|
+
|
27
|
+
```
|
2
28
|
|
3
29
|
|
4
30
|
|
@@ -67,6 +93,8 @@
|
|
67
93
|
RewriteCond %{REQUEST_FILENAME} !-f
|
68
94
|
|
69
95
|
RewriteCond %{REQUEST_FILENAME} !-d
|
96
|
+
|
97
|
+
#RewriteRule . /index.php [L]
|
70
98
|
|
71
99
|
RewriteRule ^index.php/(.*) /some-other-dir/aaa/$1 [L]
|
72
100
|
|
8
文字修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.htaccessでw
|
1
|
+
.htaccessでアドレスバーの表示を変えずにRewriteしたい場合
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
wordpressから自作サイトに
|
1
|
+
wordpressから自作サイトにrewriteしたい。
|
2
2
|
|
3
3
|
|
4
4
|
|
7
画像の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -137,3 +137,7 @@
|
|
137
137
|
|
138
138
|
|
139
139
|
ご教授お願いいたします。
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
![イメージ説明](2dba9667030367f4cc83b7a165a64ae7.png)
|
6
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,9 +4,79 @@
|
|
4
4
|
|
5
5
|
```htaccess
|
6
6
|
|
7
|
+
# BEGIN Force SSL for SAKURA
|
8
|
+
|
9
|
+
# 常時HTTPS化(HTTPSが無効な場合リダイレクト)
|
10
|
+
|
11
|
+
<IfModule mod_rewrite.c>
|
12
|
+
|
13
|
+
RewriteEngine on
|
14
|
+
|
15
|
+
RewriteCond %{HTTPS} !on
|
16
|
+
|
17
|
+
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
18
|
+
|
19
|
+
</IfModule>
|
20
|
+
|
21
|
+
# END Force SSL for SAKURA
|
22
|
+
|
23
|
+
# BEGIN SAKURA Internet Inc.
|
24
|
+
|
25
|
+
<IfModule mod_deflate.c>
|
26
|
+
|
27
|
+
SetOutputFilter DEFLATE
|
28
|
+
|
29
|
+
AddOutputFilterByType DEFLATE text/css
|
30
|
+
|
31
|
+
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
|
32
|
+
|
33
|
+
</IfModule>
|
34
|
+
|
35
|
+
<IfModule mod_expires.c>
|
36
|
+
|
37
|
+
ExpiresActive On
|
38
|
+
|
39
|
+
<FilesMatch ".(css|js)$">
|
40
|
+
|
41
|
+
ExpiresDefault "access plus 1 week"
|
42
|
+
|
43
|
+
</FilesMatch>
|
44
|
+
|
45
|
+
<FilesMatch ".(gif|jpe?g|png)$">
|
46
|
+
|
47
|
+
ExpiresDefault "access plus 1 month"
|
48
|
+
|
49
|
+
</FilesMatch>
|
50
|
+
|
51
|
+
</IfModule>
|
52
|
+
|
53
|
+
# END SAKURA Internet Inc.
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
# BEGIN WordPress
|
58
|
+
|
59
|
+
<IfModule mod_rewrite.c>
|
60
|
+
|
61
|
+
RewriteEngine On
|
62
|
+
|
63
|
+
RewriteBase /
|
64
|
+
|
7
|
-
|
65
|
+
RewriteRule ^index.php$ - [L]
|
66
|
+
|
67
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
68
|
+
|
69
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
8
70
|
|
9
71
|
RewriteRule ^index.php/(.*) /some-other-dir/aaa/$1 [L]
|
72
|
+
|
73
|
+
</IfModule>
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
# END WordPress
|
78
|
+
|
79
|
+
|
10
80
|
|
11
81
|
```
|
12
82
|
|
5
タイトル編集
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.htaccessでwordpressのページを自作サイト
|
1
|
+
.htaccessでwordpressのページを自作サイト内部リダイレクトしたい(URLそのまま)
|
test
CHANGED
File without changes
|
4
タイトル変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
wordpressのページを自作サイトに変更したい
|
1
|
+
.htaccessでwordpressのページを自作サイトに変更したい(URLそのまま)
|
test
CHANGED
File without changes
|
3
コードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
#RewriteRule . /index.php [L]
|
8
8
|
|
9
|
-
RewriteRule ^index.php/(.*) /some-other-dir/
|
9
|
+
RewriteRule ^index.php/(.*) /some-other-dir/aaa/$1 [L]
|
10
10
|
|
11
11
|
```
|
12
12
|
|
2
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
wordpressから自作サイトに読み込みを移したい。
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
```htaccess
|
6
|
+
|
7
|
+
#RewriteRule . /index.php [L]
|
8
|
+
|
9
|
+
RewriteRule ^index.php/(.*) /some-other-dir/clear/$1 [L]
|
10
|
+
|
11
|
+
```
|
12
|
+
|
13
|
+
|
14
|
+
|
1
15
|
現在
|
2
16
|
|
3
17
|
https://aaa.com/ (wordpress) → https://aaa.com/aaa (CMSなしの自作サイト)
|
1
追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|