wordpressを他サーバーからロリポップに引越しました。
引越前(他サーバー):wordpressのみ
引越後(ロリポップ):LP(ランディングページ) とwordpress
ロリポップ ルートディレクトリ
index.html(LP)
index.php(wordpress)
・・・他wordpressやLPに必要なファイル
LPをindex.html、wordpressをindex.phpで共存させたいので
wordpressの
wp-includes > canonical.php
以下をコメントアウト
$redirect['path'] = preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/*?$|', '/', $redirect['path']);
この時点で、両方表示され問題ありませんでした。
http://sample.main.jp → LPのindex.htmlが表示される
http://sample.main.jp/index.php → wordpressのindex.phpが表示される
ところが、独自ドメインに変更したところ
LPをindex.html、wordpressをindex.phpで共存できなくなりました。
http://test.jp → LPのindex.htmlが表示される
http://test.jp/index.php → wordpressのindex.phpがが表示されず http://test.jp LPのindex.htmlにリダイレクト(?)される
※ドメイン例
ロリポップドメイン:http://sample.main.jp
独自ドメイン :http://test.jp
○環境
php5.6
WordPress 4.9.9
○htaccess
#クローラーを拒否(公開したら削除予定)
SetEnvIf User-Agent "Googlebot" shutout
SetEnvIf User-Agent "Slurp" shutout
SetEnvIf User-Agent "msnbot" shutout
order Allow,Deny
Allow from all
Deny from env=shutout
BEGIN WordPress
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/01/04 00:44