将此添加到。网站根文件夹中的htaccess文件。如果删除了它,请再次创建并粘贴它。
DirectoryIndex index.html index.php
# 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
编辑看起来您对
DirectoryIndex
.在您的
httpd.conf
搜索
DirectoryIndex
并确保添加索引。php在其中。或者在虚拟主机配置中。
像这样。
DirectoryIndex index.html index.htm index.php