WordPressのマルチサイト(サブディレクトリ)でサブサイトが404エラーになります。
.htaccessはこのようになっております。
※<が<、>が>になっていたので修正しましたが修正前も修正後も変わらず、、
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L] RewriteRule . index.php [L] </IfModule> # END WordPress
mod_rewrite があるかどうか怪しかったので
https://qiita.com/u-akihiro/items/c7a5bb38c34858d00c2a
の通りに
sudo a2enmod rewrite
↑をやるとこう表示されます↓ だからしっかり入ってるはず。
Module rewrite already enabled
入ってるとは思うのですが
http://etc.gaphal.com/?p=7
のサイト通りに.htaccessを設定してもグーグルには飛ばされず、wordpressサイトが正常に表示される。
※いろんなページにも行ける
もう何がなんだかわかりません。お助けくださいお願いします。
環境
OS xubuntu
apache2
[情報追加・追記]
/test ←がサブサイトのディレクトリです。
アクセスログ
::1 - - [06/Feb/2018:15:46:26 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.18 (Ubuntu) (internal dummy connection)" 192.168.0.15 - - [06/Feb/2018:15:47:00 +0900] "GET /test HTTP/1.1" 404 501 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 192.168.0.15 - - [06/Feb/2018:15:47:02 +0900] "GET /wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1 HTTP/1.1" 200 4366 "http://hogehoge.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 192.168.0.15 - - [06/Feb/2018:15:47:02 +0900] "GET /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js?ver=1.0 HTTP/1.1" 200 766 "http://hogehoge.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 192.168.0.15 - - [06/Feb/2018:15:47:02 +0900] "GET /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js?ver=2.1.2 HTTP/1.1" 200 2760 "http://hogehoge.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 192.168.0.15 - - [06/Feb/2018:15:47:02 +0900] "GET /wp-content/themes/twentyseventeen/assets/js/global.js?ver=1.0 HTTP/1.1" 200 2958 "http://hogehoge.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 192.168.0.15 - - [06/Feb/2018:15:47:02 +0900] "GET /wp-includes/js/wp-emoji-release.min.js?ver=4.9.2 HTTP/1.1" 200 4674 "http://hogehoge.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 192.168.0.15 - - [06/Feb/2018:15:47:02 +0900] "GET /wp-includes/js/wp-embed.min.js?ver=4.9.2 HTTP/1.1" 200 1101 "http://hogehoge.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 192.168.0.15 - - [06/Feb/2018:15:47:02 +0900] "GET /wp-includes/js/jquery/jquery.js?ver=1.12.4 HTTP/1.1" 200 34119 "http://hogehoge.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0" 192.168.0.15 - - [06/Feb/2018:15:47:08 +0900] "GET /test/ HTTP/1.1" 404 502 "http://hogehoge.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0"
エラーログ
[Tue Feb 06 00:54:24.503047 2018] [:error] [pid 5660] [client 191.190.59.4:42491] script '/var/www/testliber/getcfg.php' not found or unable to stat [Tue Feb 06 00:54:30.170855 2018] [:error] [pid 5993] [client 191.190.59.4:42517] script '/var/www/testliber/getcfg.php' not found or unable to stat [Tue Feb 06 07:35:01.750996 2018] [mpm_prefork:notice] [pid 5653] AH00171: Graceful restart requested, doing restart AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
あなたの回答
tips
プレビュー