我已经在本地机器(Centos 7)上安装了 WordPress。如果没有漂亮的 URL,它运行良好。
我试图让它发挥作用:
在 /etc/httpd/conf/httpd.con 下设置 Allowoverride All 并重新启动 httpd 服务。
使用以下代码行在 WordPress 目录中创建 .htaccess 文件:
<IfModule mod_rewrite.c>
重写引擎开启
重写基数 /
重写规则 ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
重写规则。/rakesh/index.php [L]
</IfModule>
结果我得到“未找到
在此服务器上找不到请求的 URL /index.php。”
须藤 chown apache /var/www/html/wordpress/.htaccess 须藤 chmod 777/var/www/html/wordpress/.htaccess
.