我使用MAMP創建了一個虛擬主機。當我轉到example.dev時,它運行良好。我只是在example.dev上安裝了一個wordpress,沒有任何問題。當我顯示頁面或帖子時,會在頁面名稱前添加一個/index.php。例如:example.dev/index.php/pagename。 我無法訪問example.dev/pagename,我有一個404錯誤。 在固定鏈接的選項中,它會自動生成/index.php/%year%/%monthnum%/%day%/%postname%/
。 我選擇了http://example.dev/example-article/
,但它仍然不起作用。index.php在wordpress中使用虛擬主機在url中添加
我有一個htaccess的在根
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
如果有人有一個想法......
謝謝!!