我已经在子目录/www/html/wordpress/(而不是/www/html/)中安装了wordpress,这里给出了解决方案How to get rid of index.php 无法在此服务器上工作。
解决方案建议在中添加以下内容。htaccess:
# 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
并在apache配置中更改为“AllowOverride ALL”。该解决方案适用于我的另一台服务器,wordpress安装在/www/html/上,而不是这台。你知道这是为什么吗?我怎样才能修复它?(显然,我应该在.htaccess中更改上述代码,但我不知道如何更改)