質問編集履歴

1

情報を追加しました。

2017/08/03 04:30

投稿

yclin_tagaya
yclin_tagaya

スコア27

test CHANGED
File without changes
test CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
 
17
- **https://www.example.com/media/contents/85/2/**
17
+ **https://example.com/media/contents/85/2/**
18
18
 
19
19
  こうして記事の2ページ目に行こうとした時に
20
20
 
@@ -30,7 +30,7 @@
30
30
 
31
31
  そしてたまたま最後のスラッシュを付けずに叩いてみたらいけました!
32
32
 
33
- **https://www.example.com/media/contents/85/2**
33
+ **https://example.com/media/contents/85/2**
34
34
 
35
35
 
36
36
 
@@ -40,6 +40,230 @@
40
40
 
41
41
 
42
42
 
43
+ ---
44
+
45
+ ご指摘ありましたので、情報を追加致します。
46
+
47
+ すみませんがどうぞよろしくお願いいたします。
48
+
49
+
50
+
51
+ マルチサイトのため、
52
+
53
+ いつものファイルとフォルダは以下のようになっております。
54
+
55
+ `ドキュメントルート/media/wp/wp-content`
56
+
57
+ `ドキュメントルート/media/wp/wp-config.php`
58
+
59
+
60
+
61
+ ただ、.htaccessが
62
+
63
+ `ドキュメントルート/media/.htaccess`に置いてあります。
64
+
65
+
66
+
67
+ ---
68
+
69
+
70
+
71
+ **htaccessの内容を共有します**
72
+
73
+ ```
74
+
75
+ Options -Indexes
76
+
77
+
78
+
79
+ <IfModule mod_rewrite.c>
80
+
81
+ RewriteEngine On
82
+
83
+ RewriteBase /media/
84
+
85
+ RewriteRule ^index\.php$ - [L]
86
+
87
+ RewriteCond %{REQUEST_FILENAME} !-f
88
+
89
+ RewriteCond %{REQUEST_FILENAME} !-d
90
+
91
+ RewriteRule . /media/index.php [L]
92
+
93
+ </IfModule>
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ #Enable Keep-Alive
102
+
103
+ <IfModule mod_headers.c>
104
+
105
+ Header set Connection keep-alive
106
+
107
+ </IfModule>
108
+
109
+
110
+
111
+
112
+
113
+ <IfModule mod_deflate.c>
114
+
115
+ SetOutputFilter DEFLATE
116
+
117
+ BrowserMatch ^Mozilla/4 gzip-only-text/html
118
+
119
+ BrowserMatch ^Mozilla/4\.0[678] no-gzip
120
+
121
+ BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
122
+
123
+ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|ico)$ no-gzip dont-vary
124
+
125
+ SetEnvIfNoCase Request_URI _\.utxt$ no-gzip
126
+
127
+ #DeflateCompressionLevel 4
128
+
129
+ AddOutputFilterByType DEFLATE text/plain
130
+
131
+ AddOutputFilterByType DEFLATE text/html
132
+
133
+ AddOutputFilterByType DEFLATE text/xml
134
+
135
+ AddOutputFilterByType DEFLATE text/css
136
+
137
+ AddOutputFilterByType DEFLATE application/xhtml+xml
138
+
139
+ AddOutputFilterByType DEFLATE application/xml
140
+
141
+ AddOutputFilterByType DEFLATE application/rss+xml
142
+
143
+ AddOutputFilterByType DEFLATE application/atom_xml
144
+
145
+ AddOutputFilterByType DEFLATE application/x-javascript
146
+
147
+ AddOutputFilterByType DEFLATE application/x-httpd-php
148
+
149
+ </IfModule>
150
+
151
+
152
+
153
+
154
+
155
+ <ifModule mod_expires.c>
156
+
157
+ ExpiresActive On
158
+
159
+ ExpiresDefault "access plus 30 minutes"
160
+
161
+ ExpiresByType text/html "access plus 10 seconds"
162
+
163
+ ExpiresByType image/jpg "access plus 7 days"
164
+
165
+ ExpiresByType image/jpeg "access plus 7 days"
166
+
167
+ ExpiresByType image/gif "access plus 7 days"
168
+
169
+ ExpiresByType image/png "access plus 7 days"
170
+
171
+ ExpiresByType text/css "access plus 1 month"
172
+
173
+ ExpiresByType application/pdf "access plus 1 month"
174
+
175
+ ExpiresByType text/x-javascript "access plus 1 month"
176
+
177
+ ExpiresByType application/javascript "access plus 1 month"
178
+
179
+ ExpiresByType application/x-javascript "access plus 1 month"
180
+
181
+ ExpiresByType application/x-shockwave-flash "access plus 1 month"
182
+
183
+ ExpiresByType image/x-icon "access plus 1 month"
184
+
185
+ ExpiresByType image/svg+xml "access plus 1 month"
186
+
187
+ ExpiresByType video/ogg "access plus 1 month"
188
+
189
+ ExpiresByType audio/ogg "access plus 1 month"
190
+
191
+ ExpiresByType video/mp4 "access plus 1 month"
192
+
193
+ ExpiresByType video/webm "access plus 1 month"
194
+
195
+ </ifModule>
196
+
197
+ ```
198
+
199
+
200
+
201
+ ---
202
+
203
+
204
+
205
+ **confの内容も共有します**
206
+
207
+
208
+
209
+ ```
210
+
211
+ <VirtualHost *:80>
212
+
213
+ ServerName example.com
214
+
215
+ ServerAlias alb.example.com
216
+
217
+ ServerAdmin abcdefg@exapmle.com
218
+
219
+ DocumentRoot ドキュメントルート
220
+
221
+ <Directory ドキュメントルート>
222
+
223
+ Options Indexes FollowSymLinks MultiViews
224
+
225
+ AllowOverride All
226
+
227
+ Order allow,deny
228
+
229
+ allow from all
230
+
231
+ Require all granted
232
+
233
+ </Directory>
234
+
235
+ ErrorLog error.log
236
+
237
+ LogLevel warn
238
+
239
+ CustomLog access.log elb-customlog
240
+
241
+ #<ifModule mod_rewrite.c>
242
+
243
+ RewriteEngine On
244
+
245
+ #RewriteCond %{HTTPS} off
246
+
247
+ #RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
248
+
249
+ #Dealing elb; http->https
250
+
251
+ RewriteCond %{HTTP:X-Forwarded-Port} !^443$
252
+
253
+ RewriteCond %{HTTP_USER_AGENT} !^ELB-HealthChecker
254
+
255
+ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
256
+
257
+ #</ifModule>
258
+
259
+ </VirtualHost>
260
+
261
+ ```
262
+
263
+
264
+
265
+
266
+
43
267
  必要な情報はご提供致します。
44
268
 
45
269