2017-02-27 9 views
0

私はMAMPで仮想ホストを作成しました。私がexample.devに行くとうまくいく。私はexample.devにwordpressを何も問題なくインストールしました。ページや投稿を表示すると、ページ名の前に/index.phpが追加されます。例:example.dev/index.php /ページ名 example.dev/pagenameにアクセスできません。私は404エラーがあります。 permalinkのオプションでは、自動的に/index.php/%year%/%monthnum%/%day%/%postname%/が生成されます。 http://example.dev/example-article/を選択しましたが、まだ動作していません。誰かがアイデアを持っている場合index.phpは、wordpressにvirtualhostでURLに追加されました

私はルート

RewriteEngine On 

# 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 

でhtaccessファイルを持っている...

ありがとうございました!! /index.php/%year%/%monthnum%/%day%/%postname%/はApacheサーバ上で動作します。このURLに

答えて

0

WordPressのルールの上に.htaccessファイル

RewriteRule ^index.php/(.*)/?$ /$1/ [L] 

にこのルールを追加します。あなたのhtaccessファイルは、それが希望基本的なワードプレスのルールを持っていることを

RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 

を考えます次のようになります。

終了ワードプレス

関連する問題