質問編集履歴

3

.htaccessの内容が足りなかったので追記

2018/06/04 17:37

投稿

mariocart
mariocart

スコア12

test CHANGED
File without changes
test CHANGED
@@ -120,6 +120,10 @@
120
120
 
121
121
  Redirect 301 /old/180101_01.html /new/100
122
122
 
123
+ Redirect 301 /old/180201_01.html /new/300
124
+
123
125
  Redirect 301 /old/180301_01.html /new/500
124
126
 
127
+
128
+
125
129
  ```

2

必要な情報を追記しました

2018/06/04 17:37

投稿

mariocart
mariocart

スコア12

test CHANGED
File without changes
test CHANGED
@@ -55,3 +55,71 @@
55
55
 
56
56
 
57
57
 
58
+
59
+
60
+
61
+ **### ◆追記**
62
+
63
+ .htaccessの内容は下記の通りです。
64
+
65
+
66
+
67
+ 大事な前提を書いていませんでした。WordPressのサイトです。そのためhtaccessにWordPressのための記述があります。
68
+
69
+ (# BEGIN WordPress から# END WordPressまで)
70
+
71
+
72
+
73
+ また、最初の方は、使っているレンタルサーバーでWordPressを動かすために必要な記述です。
74
+
75
+
76
+
77
+
78
+
79
+ ```ここに言語を入力
80
+
81
+ AddHandler x-httpd-php5619 .php
82
+
83
+ suPHP_ConfigPath /home/ユーザーディレクトリのパス
84
+
85
+ <FilesMatch "^(.htaccess|.htpasswd|php.ini|.*.sql|.*.log|.*.cron|.*.inc|.*.phps|.*.yml)$">
86
+
87
+ Deny from all
88
+
89
+ </FilesMatch>
90
+
91
+ Options +SymLinksIfOwnerMatch
92
+
93
+
94
+
95
+ # BEGIN WordPress
96
+
97
+ <IfModule mod_rewrite.c>
98
+
99
+ RewriteEngine On
100
+
101
+ RewriteBase /
102
+
103
+ RewriteRule ^index.php$ - [L]
104
+
105
+ RewriteCond %{REQUEST_FILENAME} !-f
106
+
107
+ RewriteCond %{REQUEST_FILENAME} !-d
108
+
109
+ RewriteRule . /index.php [L]
110
+
111
+ </IfModule>
112
+
113
+
114
+
115
+ # END WordPress
116
+
117
+
118
+
119
+
120
+
121
+ Redirect 301 /old/180101_01.html /new/100
122
+
123
+ Redirect 301 /old/180301_01.html /new/500
124
+
125
+ ```

1

最初の方で、「http://example.com/new/100」とすべきところを「http://example.com/new/200」としていたので修正しました。

2018/06/04 17:34

投稿

mariocart
mariocart

スコア12

test CHANGED
File without changes
test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- http://example.com/new/200
9
+ http://example.com/new/100
10
10
 
11
11
 
12
12