質問編集履歴
11
タグ
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
10
文字修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
wordpressから自作サイトにrewriteしたい。
|
2
2
|
|
3
3
|
以下のこれが問題です。
|
4
|
+
|
5
|
+
ポイント
|
4
6
|
```htaccess
|
5
7
|
<IfModule mod_rewrite.c>
|
6
8
|
RewriteEngine On
|
@@ -12,7 +14,7 @@
|
|
12
14
|
RewriteRule ^index.php/(.*) /some-other-dir/aaa/$1 [L]
|
13
15
|
</IfModule>
|
14
16
|
```
|
15
|
-
|
17
|
+
全体
|
16
18
|
```htaccess
|
17
19
|
# BEGIN Force SSL for SAKURA
|
18
20
|
# 常時HTTPS化(HTTPSが無効な場合リダイレクト)
|
9
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
wordpressから自作サイトにrewriteしたい。
|
2
2
|
|
3
|
+
以下のこれが問題です。
|
3
4
|
```htaccess
|
5
|
+
<IfModule mod_rewrite.c>
|
6
|
+
RewriteEngine On
|
7
|
+
RewriteBase /
|
8
|
+
RewriteRule ^index.php$ - [L]
|
9
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
10
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
11
|
+
#RewriteRule . /index.php [L]
|
12
|
+
RewriteRule ^index.php/(.*) /some-other-dir/aaa/$1 [L]
|
13
|
+
</IfModule>
|
14
|
+
```
|
15
|
+
|
16
|
+
```htaccess
|
4
17
|
# BEGIN Force SSL for SAKURA
|
5
18
|
# 常時HTTPS化(HTTPSが無効な場合リダイレクト)
|
6
19
|
<IfModule mod_rewrite.c>
|
@@ -33,6 +46,7 @@
|
|
33
46
|
RewriteRule ^index.php$ - [L]
|
34
47
|
RewriteCond %{REQUEST_FILENAME} !-f
|
35
48
|
RewriteCond %{REQUEST_FILENAME} !-d
|
49
|
+
#RewriteRule . /index.php [L]
|
36
50
|
RewriteRule ^index.php/(.*) /some-other-dir/aaa/$1 [L]
|
37
51
|
</IfModule>
|
38
52
|
|
8
文字修正
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
.htaccessで
|
1
|
+
.htaccessでアドレスバーの表示を変えずにRewriteしたい場合
|
body
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
wordpressから自作サイトに
|
1
|
+
wordpressから自作サイトにrewriteしたい。
|
2
2
|
|
3
3
|
```htaccess
|
4
4
|
# BEGIN Force SSL for SAKURA
|
7
画像の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -67,4 +67,6 @@
|
|
67
67
|
やりたい事
|
68
68
|
https://aaa.com/ (wordpress) → https://aaa.com/ (CMSなしの自作サイト)
|
69
69
|
|
70
|
-
ご教授お願いいたします。
|
70
|
+
ご教授お願いいたします。
|
71
|
+
|
72
|
+

|
6
コード修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,8 +1,43 @@
|
|
1
1
|
wordpressから自作サイトに読み込みを移したい。
|
2
2
|
|
3
3
|
```htaccess
|
4
|
+
# BEGIN Force SSL for SAKURA
|
5
|
+
# 常時HTTPS化(HTTPSが無効な場合リダイレクト)
|
6
|
+
<IfModule mod_rewrite.c>
|
7
|
+
RewriteEngine on
|
8
|
+
RewriteCond %{HTTPS} !on
|
9
|
+
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
10
|
+
</IfModule>
|
11
|
+
# END Force SSL for SAKURA
|
12
|
+
# BEGIN SAKURA Internet Inc.
|
13
|
+
<IfModule mod_deflate.c>
|
14
|
+
SetOutputFilter DEFLATE
|
15
|
+
AddOutputFilterByType DEFLATE text/css
|
16
|
+
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
|
17
|
+
</IfModule>
|
18
|
+
<IfModule mod_expires.c>
|
19
|
+
ExpiresActive On
|
20
|
+
<FilesMatch ".(css|js)$">
|
21
|
+
ExpiresDefault "access plus 1 week"
|
22
|
+
</FilesMatch>
|
23
|
+
<FilesMatch ".(gif|jpe?g|png)$">
|
24
|
+
ExpiresDefault "access plus 1 month"
|
25
|
+
</FilesMatch>
|
26
|
+
</IfModule>
|
27
|
+
# END SAKURA Internet Inc.
|
28
|
+
|
29
|
+
# BEGIN WordPress
|
30
|
+
<IfModule mod_rewrite.c>
|
31
|
+
RewriteEngine On
|
32
|
+
RewriteBase /
|
4
|
-
|
33
|
+
RewriteRule ^index.php$ - [L]
|
34
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
35
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
5
36
|
RewriteRule ^index.php/(.*) /some-other-dir/aaa/$1 [L]
|
37
|
+
</IfModule>
|
38
|
+
|
39
|
+
# END WordPress
|
40
|
+
|
6
41
|
```
|
7
42
|
|
8
43
|
現在
|
5
タイトル編集
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
.htaccessでwordpressのページを自作サイト
|
1
|
+
.htaccessでwordpressのページを自作サイト内部リダイレクトしたい(URLそのまま)
|
body
CHANGED
File without changes
|
4
タイトル変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
wordpressのページを自作サイトに変更したい
|
1
|
+
.htaccessでwordpressのページを自作サイトに変更したい(URLそのまま)
|
body
CHANGED
File without changes
|
3
コードの修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
```htaccess
|
4
4
|
#RewriteRule . /index.php [L]
|
5
|
-
RewriteRule ^index.php/(.*) /some-other-dir/
|
5
|
+
RewriteRule ^index.php/(.*) /some-other-dir/aaa/$1 [L]
|
6
6
|
```
|
7
7
|
|
8
8
|
現在
|
2
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
wordpressから自作サイトに読み込みを移したい。
|
2
|
+
|
3
|
+
```htaccess
|
4
|
+
#RewriteRule . /index.php [L]
|
5
|
+
RewriteRule ^index.php/(.*) /some-other-dir/clear/$1 [L]
|
6
|
+
```
|
7
|
+
|
1
8
|
現在
|
2
9
|
https://aaa.com/ (wordpress) → https://aaa.com/aaa (CMSなしの自作サイト)
|
3
10
|
|
1
追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|