RewriteRuleでindex.phpに飛ばせばどうでしょう?
トピック投稿者
boron
(@hidehasi)
shokun0803様 ご回答ありがとうございます。
RewriteRuleにしますとなぜか404になってしまいます。
そもそもmod_rewriteに詳しくないので合っている自信もも
ないので、よろしければどのように書けばいいか教えて頂けますと
大変ありがたいです。
ちなみに私は以下のように書いていました。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^/index\.html$ /index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
こんな感じ?
RewriteCond /index.html !-f
RewriteRule index.html index.php [L]
トピック投稿者
boron
(@hidehasi)
shokun0803様
教えて頂きましてありがとうございます!
早速試してみましたが、やはり404ページが表示されます。
ちなみに以下のように設定しております。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond /index.html !-f
RewriteRule index.html index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
もし何かヒントになりそうなことがございましたら
何でも結構ですので教えて頂けたら嬉しいです。
よろしくお願いします。
え~っと、
・ルートにindex.htmlがない。(前提条件)
・ルートにindex.phpがある。(ルートにwordpressがインストールされている、もしくは・wordpressインストールフォルダからindex.phpおよびhtaccessがコピーされ適切に書き換えられている)
・RewriteRuleが有効である。(簡単な設定で動作しているか確認してみる?下層に適当なフォルダを作って試してみるといいかも?)
・そもそもhtaccessが有効である。
でなければなんだろ。