質問編集履歴
3
exampleに修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
以下、5つのサンプルで.htaccessファイルに書き込む内容をお教えいただけますと幸いです。
|
|
10
10
|
|
|
11
11
|
|旧サイトURL |新サイトURL |
|
|
12
|
-
|http://
|
|
12
|
+
|http://example.co.jp/aboutus/index.php | https://example.co.jp/aboutus |
|
|
13
|
-
|http://
|
|
13
|
+
|http://example.co.jp/servicesbl/service.php | https://example.co.jp/services/service|
|
|
14
|
-
|http://
|
|
14
|
+
|http://example.co.jp/servicesbl/index.php?ID=1 | https://example.co.jp/services/id1 |
|
|
15
|
-
|http://
|
|
15
|
+
|http://example.co.jp/servicesbl/index.php?ID=2 | https://example.co.jp/services/id2 |
|
|
16
|
-
|http://
|
|
16
|
+
|http://example.co.jp/servicesbl/index.php?ID=3 | https://example.co.jp/services/id3 |
|
|
17
17
|
|
|
18
18
|
何卒、よろしくお願いいたします。
|
|
19
19
|
|
2
テストの入れ替え
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -17,11 +17,28 @@
|
|
|
17
17
|
|
|
18
18
|
何卒、よろしくお願いいたします。
|
|
19
19
|
|
|
20
|
-
2,3時間検索してますが
|
|
21
|
-
RewriteCond %{HTTPS} off
|
|
22
|
-
RewriteCond %{QUERY_STRING}
|
|
23
|
-
|
|
20
|
+
試しに以下のようなhtaccessファイルを制作してアップロードしてみました。
|
|
21
|
+
...
|
|
22
|
+
# BEGIN WordPress
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
<IfModule mod_rewrite.c>
|
|
25
|
+
RewriteEngine On
|
|
26
|
+
RewriteBase /
|
|
27
|
+
RewriteRule ^index\.php$ - [L]
|
|
26
|
-
|
|
28
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
|
29
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
|
30
|
+
RewriteRule . /index.php [L]
|
|
31
|
+
</IfModule>
|
|
32
|
+
|
|
33
|
+
# END WordPress
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
RewriteEngine on
|
|
37
|
+
RewriteRule ^http://sample.co.jp/aboutus/$ http://sample.co.jp/aboutus/aboutus/profile [R=301,L]
|
|
38
|
+
...
|
|
39
|
+
|
|
40
|
+
その後http://tool.mface.jp/redirects/のページにhttp://sample.co.jp/aboutus/と入力し、ユーザーエージェントをgoogleにし、実行してみましたが「リダイレクト回数 0」と表示されてしまいました。
|
|
41
|
+
htaccessファイルの設置場所は正しいと思います。(削除するとページも動かなくなるので)
|
|
42
|
+
|
|
27
|
-
|
|
43
|
+
何か単純な見落としだと思いますが、ご指摘いただけることございませんでしょうか?
|
|
44
|
+
よろしくお願いいたします。
|
1
、編集・追記依頼対応
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -15,4 +15,13 @@
|
|
|
15
15
|
|http://sample.co.jp/servicesbl/index.php?ID=2 | https://sample.co.jp/services/id2 |
|
|
16
16
|
|http://sample.co.jp/servicesbl/index.php?ID=3 | https://sample.co.jp/services/id3 |
|
|
17
17
|
|
|
18
|
-
何卒、よろしくお願いいたします。
|
|
18
|
+
何卒、よろしくお願いいたします。
|
|
19
|
+
|
|
20
|
+
2,3時間検索してますが
|
|
21
|
+
RewriteCond %{HTTPS} off
|
|
22
|
+
RewriteCond %{QUERY_STRING}
|
|
23
|
+
を同時に扱う作例に当たらず質問させていただきました。
|
|
24
|
+
|
|
25
|
+
まだサイトのドメインが確定していない状況での調査段階で、
|
|
26
|
+
テストするのに丁度いいクエリ付URLのページが用意は出来ておらず、
|
|
27
|
+
試行錯誤が難しかったので、質問させていただいております。
|