我安装了一个带有LAMP的VPS,我在上面运行了几个网站,每个网站都通过CNAME重定向到一个子文件夹/domain.com/htdocs。
其中一个网站是wordpress。我在试着激活我的页面的permalinks。按照本教程的指示,我尝试修改apache2/sites available/domain.com文件的配置,以将AllowOverride None更改为AllowOverride All。
我仍然得到相同的404错误:
在此服务器上找不到请求的URL /页面名称/。
我检查了我的FTP,我的.htaccess文件存在并且有正确的permalink重定向:
# 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我成功激活permalinks的唯一方法是将index.php/放在它前面:
mywebsite.com/index.php/page-name/
知道怎么解决这个问题吗?我会非常感激的,我已经努力工作了好几个小时了!
提前谢谢你,
亚瑟
发布于 2015-07-01 13:49:15
我自己解决了。我只需要用命令mod_rewrite重写加载a2enmod模块。
希望这能帮到别人!
https://stackoverflow.com/questions/31163052
复制相似问题