質問編集履歴

3

追記:試したこと

2020/04/27 04:17

投稿

naxer
naxer

スコア0

test CHANGED
File without changes
test CHANGED
@@ -581,3 +581,9 @@
581
581
  ・導入プラグインは「WpFastestCache」「really-simple-ssl」「wp-scss」です。
582
582
 
583
583
  ・index.phpの変更などはありません。
584
+
585
+
586
+
587
+ ※4/27追記
588
+
589
+ データベースを初期化して、ワードプレスインストール後の初期状態のsqlファイルをインポートするとダッシュボードへアクセスできました。(wp-contents/wp-admin/wp-inculudなどのファイル類は何も変更せず)

2

試したことの修正:コードの追加

2020/04/27 04:16

投稿

naxer
naxer

スコア0

test CHANGED
File without changes
test CHANGED
@@ -34,10 +34,550 @@
34
34
 
35
35
 
36
36
 
37
-
38
-
39
- ### 補足
40
-
41
- FTPソフトやphpMyAdminは使用できます。
42
-
43
- wordpressの再インストールは怖くてまだ試していません。
37
+ ≪htaccessの変更点≫
38
+
39
+ ※wpフォルダと同じ階層のhtaccessと一つ上の階層のhtaccessを変更しました。
40
+
41
+
42
+
43
+ ```【WPと同じ階層のhtaccess
44
+
45
+ 【WPと同じ階層のhtaccess】
46
+
47
+ 〇変更前
48
+
49
+ <IfModule mod_rewrite.c>
50
+
51
+ RewriteEngine On
52
+
53
+ RewriteCond %{HTTP_ACCEPT} image/webp
54
+
55
+ RewriteCond %{REQUEST_FILENAME} (.*).(jpe?g|png)$
56
+
57
+ RewriteCond %{REQUEST_FILENAME}.webp -f
58
+
59
+ RewriteCond %{QUERY_STRING} !type=original
60
+
61
+ RewriteRule (.+).(jpe?g|png)$ %{REQUEST_FILENAME}.webp [T=image/webp,E=accept:1,L]
62
+
63
+ </IfModule>
64
+
65
+ <IfModule mod_headers.c>
66
+
67
+ Header append Vary Accept env=REDIRECT_accept
68
+
69
+ </IfModule>
70
+
71
+ AddType image/webp .webp
72
+
73
+ <IfModule mod_rewrite.c>
74
+
75
+ RewriteEngine On
76
+
77
+ RewriteCond %{HTTPS} off
78
+
79
+ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
80
+
81
+ RewriteCond %{HTTP_HOST} ^サイトドメイン.com
82
+
83
+ RewriteRule ^(.*) https://www.サイトドメイン$1 [R=301,L]
84
+
85
+ </IfModule>
86
+
87
+ # BEGIN WordPress
88
+
89
+ <IfModule mod_rewrite.c>
90
+
91
+ RewriteEngine On
92
+
93
+ RewriteBase /wp/
94
+
95
+ RewriteRule ^index.php$ - [L]
96
+
97
+ RewriteCond %{REQUEST_FILENAME} !-f
98
+
99
+ RewriteCond %{REQUEST_FILENAME} !-d
100
+
101
+ RewriteRule . /wp/index.php [L]
102
+
103
+ </IfModule>
104
+
105
+ # END WordPress
106
+
107
+ <IfModule mod_headers.c>
108
+
109
+ <FilesMatch ".(ico|jpe?g|png|gif|svg|swf|webp|ttf|woff|woff2|otf|eot)$">
110
+
111
+ Header set Cache-Control "max-age=31557600, public"
112
+
113
+ </FilesMatch>
114
+
115
+ <FilesMatch ".(css|js)$">
116
+
117
+ Header set Cache-Control "max-age=31557600, public"
118
+
119
+ </FilesMatch>
120
+
121
+ # プロキシサーバーが間違ったコンテンツを配布しないようにする
122
+
123
+ Header append Vary Accept-Encoding env=!dont-vary
124
+
125
+ </IfModule>
126
+
127
+
128
+
129
+ RewriteEngine On
130
+
131
+ RewriteRule ^.toilet_top/$ - [R=404,L]
132
+
133
+
134
+
135
+ 〇変更後
136
+
137
+ <IfModule mod_rewrite.c>
138
+
139
+ RewriteEngine On
140
+
141
+ RewriteCond %{HTTP_ACCEPT} image/webp
142
+
143
+ RewriteCond %{REQUEST_FILENAME} (.*).(jpe?g|png)$
144
+
145
+ RewriteCond %{REQUEST_FILENAME}.webp -f
146
+
147
+ RewriteCond %{QUERY_STRING} !type=original
148
+
149
+ RewriteRule (.+).(jpe?g|png)$ %{REQUEST_FILENAME}.webp [T=image/webp,E=accept:1,L]
150
+
151
+ </IfModule>
152
+
153
+ <IfModule mod_headers.c>
154
+
155
+ Header append Vary Accept env=REDIRECT_accept
156
+
157
+ </IfModule>
158
+
159
+ AddType image/webp .webp
160
+
161
+ <IfModule mod_rewrite.c>
162
+
163
+ RewriteEngine On
164
+
165
+ RewriteCond %{HTTPS} off
166
+
167
+ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
168
+
169
+ RewriteCond %{HTTP_HOST} ^サイトドメイン.com
170
+
171
+ RewriteRule ^(.*) https://サイトドメイン$1 [R=301,L]
172
+
173
+ </IfModule>
174
+
175
+ # BEGIN WordPress
176
+
177
+ <IfModule mod_rewrite.c>
178
+
179
+ RewriteEngine On
180
+
181
+ RewriteBase /wp/
182
+
183
+ RewriteRule ^index.php$ - [L]
184
+
185
+ RewriteCond %{REQUEST_FILENAME} !-f
186
+
187
+ RewriteCond %{REQUEST_FILENAME} !-d
188
+
189
+ RewriteRule . /wp/index.php [L]
190
+
191
+ </IfModule>
192
+
193
+ # END WordPress
194
+
195
+ <IfModule mod_headers.c>
196
+
197
+ <FilesMatch ".(ico|jpe?g|png|gif|svg|swf|webp|ttf|woff|woff2|otf|eot)$">
198
+
199
+ Header set Cache-Control "max-age=31557600, public"
200
+
201
+ </FilesMatch>
202
+
203
+ <FilesMatch ".(css|js)$">
204
+
205
+ Header set Cache-Control "max-age=31557600, public"
206
+
207
+ </FilesMatch>
208
+
209
+ # プロキシサーバーが間違ったコンテンツを配布しないようにする
210
+
211
+ Header append Vary Accept-Encoding env=!dont-vary
212
+
213
+ </IfModule>
214
+
215
+
216
+
217
+ RewriteEngine On
218
+
219
+ RewriteRule ^.toilet_top/$ - [R=404,L]
220
+
221
+
222
+
223
+ order deny,allow
224
+
225
+ deny from all
226
+
227
+ allow from 123.456.789
228
+
229
+
230
+
231
+ 【WPフォルダの一つ上の階層のhtaccess】
232
+
233
+ 〇変更前
234
+
235
+ # BEGIN WpFastestCache
236
+
237
+ <IfModule mod_rewrite.c>
238
+
239
+ RewriteEngine On
240
+
241
+ RewriteBase /
242
+
243
+ RewriteCond %{HTTPS} =on
244
+
245
+ RewriteCond %{HTTP_HOST} ^サイトドメイン
246
+
247
+ # Start WPFC Exclude
248
+
249
+ RewriteCond %{REQUEST_URI} !/mail [NC]
250
+
251
+ RewriteCond %{REQUEST_URI} !/check [NC]
252
+
253
+ RewriteCond %{REQUEST_URI} !/check2 [NC]
254
+
255
+ RewriteCond %{REQUEST_URI} !/check3 [NC]
256
+
257
+ RewriteCond %{REQUEST_URI} !/ccomplete [NC]
258
+
259
+ RewriteCond %{REQUEST_URI} !/ccomplete2 [NC]
260
+
261
+ RewriteCond %{REQUEST_URI} !/complete3 [NC]
262
+
263
+ # End WPFC Exclude
264
+
265
+ # Start_WPFC_Exclude_Admin_Cookie
266
+
267
+ RewriteCond %{HTTP:Cookie} !wordpress_logged_in_[^\=]+\=WPユーザー名
268
+
269
+ # End_WPFC_Exclude_Admin_Cookie
270
+
271
+ RewriteCond %{HTTP_HOST} ^サイトドメイン
272
+
273
+ RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit|Twitterbot|LinkedInBot|WhatsApp|Mediatoolkitbot)
274
+
275
+ RewriteCond %{HTTP_USER_AGENT} !(WP\sFastest\sCache\sPreload(\siPhone\sMobile)?\s*Bot)
276
+
277
+ RewriteCond %{REQUEST_METHOD} !POST
278
+
279
+ RewriteCond %{REQUEST_URI} !(/){2}$
280
+
281
+ RewriteCond %{REQUEST_URI} /$
282
+
283
+ RewriteCond %{QUERY_STRING} !.+
284
+
285
+ RewriteCond %{HTTP:Cookie} !wordpress_logged_in
286
+
287
+ RewriteCond %{HTTP:Cookie} !comment_author_
288
+
289
+ RewriteCond %{HTTP:Cookie} !safirmobilswitcher=mobil
290
+
291
+ RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
292
+
293
+ RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f [or]
294
+
295
+ RewriteCond /var/www/html/wp/wp-content/cache/all/$1/index.html -f
296
+
297
+ RewriteRule ^(.*) "/wp/wp-content/cache/all/$1/index.html" [L]
298
+
299
+ </IfModule>
300
+
301
+ <FilesMatch "index.(html|htm)$">
302
+
303
+ AddDefaultCharset UTF-8
304
+
305
+ <ifModule mod_headers.c>
306
+
307
+ FileETag None
308
+
309
+ Header unset ETag
310
+
311
+ Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
312
+
313
+ Header set Pragma "no-cache"
314
+
315
+ Header set Expires "Mon, 29 Oct 1923 20:30:00 GMT"
316
+
317
+ </ifModule>
318
+
319
+ </FilesMatch>
320
+
321
+ # END WpFastestCache
322
+
323
+ # BEGIN GzipWpFastestCache
324
+
325
+ <IfModule mod_deflate.c>
326
+
327
+ AddType x-font/woff .woff
328
+
329
+ AddType x-font/ttf .ttf
330
+
331
+ AddOutputFilterByType DEFLATE image/svg+xml
332
+
333
+ AddOutputFilterByType DEFLATE text/plain
334
+
335
+ AddOutputFilterByType DEFLATE text/html
336
+
337
+ AddOutputFilterByType DEFLATE text/xml
338
+
339
+ AddOutputFilterByType DEFLATE text/css
340
+
341
+ AddOutputFilterByType DEFLATE text/javascript
342
+
343
+ AddOutputFilterByType DEFLATE application/xml
344
+
345
+ AddOutputFilterByType DEFLATE application/xhtml+xml
346
+
347
+ AddOutputFilterByType DEFLATE application/rss+xml
348
+
349
+ AddOutputFilterByType DEFLATE application/javascript
350
+
351
+ AddOutputFilterByType DEFLATE application/x-javascript
352
+
353
+ AddOutputFilterByType DEFLATE application/x-font-ttf
354
+
355
+ AddOutputFilterByType DEFLATE x-font/ttf
356
+
357
+ AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
358
+
359
+ AddOutputFilterByType DEFLATE font/opentype font/ttf font/eot font/otf
360
+
361
+ </IfModule>
362
+
363
+ # END GzipWpFastestCache
364
+
365
+ # BEGIN WordPress
366
+
367
+ # `BEGIN WordPress` から `END WordPress` までのディレクティブ (行) は
368
+
369
+ # 動的に生成され、WordPress フィルターによってのみ修正が可能です。
370
+
371
+ # これらのマーカー間にあるディレクティブへのいかなる変更も上書きされてしまいます。
372
+
373
+ <IfModule mod_rewrite.c>
374
+
375
+ RewriteEngine On
376
+
377
+ RewriteBase /
378
+
379
+ RewriteRule ^index.php$ - [L]
380
+
381
+ RewriteCond %{REQUEST_FILENAME} !-f
382
+
383
+ RewriteCond %{REQUEST_FILENAME} !-d
384
+
385
+ RewriteRule . /index.php [L]
386
+
387
+ </IfModule>
388
+
389
+
390
+
391
+ # END WordPress
392
+
393
+
394
+
395
+ RewriteEngine On
396
+
397
+ RewriteRule ^.toilet_top/$ - [R=404,L]
398
+
399
+
400
+
401
+ 〇変更後
402
+
403
+ # BEGIN WpFastestCache
404
+
405
+ <IfModule mod_rewrite.c>
406
+
407
+ RewriteEngine On
408
+
409
+ RewriteBase /
410
+
411
+ RewriteCond %{HTTPS} =on
412
+
413
+ RewriteCond %{HTTP_HOST} ^サイトドメイン
414
+
415
+ # Start WPFC Exclude
416
+
417
+ RewriteCond %{REQUEST_URI} !/mail [NC]
418
+
419
+ RewriteCond %{REQUEST_URI} !/check [NC]
420
+
421
+ RewriteCond %{REQUEST_URI} !/check2 [NC]
422
+
423
+ RewriteCond %{REQUEST_URI} !/check3 [NC]
424
+
425
+ RewriteCond %{REQUEST_URI} !/ccomplete [NC]
426
+
427
+ RewriteCond %{REQUEST_URI} !/ccomplete2 [NC]
428
+
429
+ RewriteCond %{REQUEST_URI} !/complete3 [NC]
430
+
431
+ # End WPFC Exclude
432
+
433
+ # Start_WPFC_Exclude_Admin_Cookie
434
+
435
+ RewriteCond %{HTTP:Cookie} !wordpress_logged_in_[^\=]+\=WPユーザー名
436
+
437
+ # End_WPFC_Exclude_Admin_Cookie
438
+
439
+ RewriteCond %{HTTP_HOST} ^サイトドメイン
440
+
441
+ RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit|Twitterbot|LinkedInBot|WhatsApp|Mediatoolkitbot)
442
+
443
+ RewriteCond %{HTTP_USER_AGENT} !(WP\sFastest\sCache\sPreload(\siPhone\sMobile)?\s*Bot)
444
+
445
+ RewriteCond %{REQUEST_METHOD} !POST
446
+
447
+ RewriteCond %{REQUEST_URI} !(/){2}$
448
+
449
+ RewriteCond %{REQUEST_URI} /$
450
+
451
+ RewriteCond %{QUERY_STRING} !.+
452
+
453
+ RewriteCond %{HTTP:Cookie} !wordpress_logged_in
454
+
455
+ RewriteCond %{HTTP:Cookie} !comment_author_
456
+
457
+ RewriteCond %{HTTP:Cookie} !safirmobilswitcher=mobil
458
+
459
+ RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
460
+
461
+ RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f [or]
462
+
463
+ RewriteCond /var/www/html/wp/wp-content/cache/all/$1/index.html -f
464
+
465
+ RewriteRule ^(.*) "/wp/wp-content/cache/all/$1/index.html" [L]
466
+
467
+ </IfModule>
468
+
469
+ <FilesMatch "index.(html|htm)$">
470
+
471
+ AddDefaultCharset UTF-8
472
+
473
+ <ifModule mod_headers.c>
474
+
475
+ FileETag None
476
+
477
+ Header unset ETag
478
+
479
+ Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
480
+
481
+ Header set Pragma "no-cache"
482
+
483
+ Header set Expires "Mon, 29 Oct 1923 20:30:00 GMT"
484
+
485
+ </ifModule>
486
+
487
+ </FilesMatch>
488
+
489
+ # END WpFastestCache
490
+
491
+ # BEGIN GzipWpFastestCache
492
+
493
+ <IfModule mod_deflate.c>
494
+
495
+ AddType x-font/woff .woff
496
+
497
+ AddType x-font/ttf .ttf
498
+
499
+ AddOutputFilterByType DEFLATE image/svg+xml
500
+
501
+ AddOutputFilterByType DEFLATE text/plain
502
+
503
+ AddOutputFilterByType DEFLATE text/html
504
+
505
+ AddOutputFilterByType DEFLATE text/xml
506
+
507
+ AddOutputFilterByType DEFLATE text/css
508
+
509
+ AddOutputFilterByType DEFLATE text/javascript
510
+
511
+ AddOutputFilterByType DEFLATE application/xml
512
+
513
+ AddOutputFilterByType DEFLATE application/xhtml+xml
514
+
515
+ AddOutputFilterByType DEFLATE application/rss+xml
516
+
517
+ AddOutputFilterByType DEFLATE application/javascript
518
+
519
+ AddOutputFilterByType DEFLATE application/x-javascript
520
+
521
+ AddOutputFilterByType DEFLATE application/x-font-ttf
522
+
523
+ AddOutputFilterByType DEFLATE x-font/ttf
524
+
525
+ AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
526
+
527
+ AddOutputFilterByType DEFLATE font/opentype font/ttf font/eot font/otf
528
+
529
+ </IfModule>
530
+
531
+ # END GzipWpFastestCache
532
+
533
+ # BEGIN WordPress
534
+
535
+ # `BEGIN WordPress` から `END WordPress` までのディレクティブ (行) は
536
+
537
+ # 動的に生成され、WordPress フィルターによってのみ修正が可能です。
538
+
539
+ # これらのマーカー間にあるディレクティブへのいかなる変更も上書きされてしまいます。
540
+
541
+ <IfModule mod_rewrite.c>
542
+
543
+ RewriteEngine On
544
+
545
+ RewriteBase /
546
+
547
+ RewriteRule ^index.php$ - [L]
548
+
549
+ RewriteCond %{REQUEST_FILENAME} !-f
550
+
551
+ RewriteCond %{REQUEST_FILENAME} !-d
552
+
553
+ RewriteRule . /index.php [L]
554
+
555
+ </IfModule>
556
+
557
+
558
+
559
+ # END WordPress
560
+
561
+
562
+
563
+ RewriteEngine On
564
+
565
+ RewriteRule ^.toilet_top/$ - [R=404,L]
566
+
567
+
568
+
569
+ order deny,allow
570
+
571
+ deny from all
572
+
573
+ allow from 123.456.789
574
+
575
+
576
+
577
+ ```
578
+
579
+
580
+
581
+ ・導入プラグインは「WpFastestCache」「really-simple-ssl」「wp-scss」です。
582
+
583
+ ・index.phpの変更などはありません。

1

質問タイトルの修正

2020/04/24 07:02

投稿

naxer
naxer

スコア0

test CHANGED
@@ -1 +1 @@
1
- ワードプレスのダッシュボードに入れない(トップページへ遷移してしまう)
1
+ htaccessを変更後、ワードプレスのダッシュボードに入れない(トップページへ遷移してしまう)。変更前に戻しても改善されない。
test CHANGED
File without changes