我的 WordPress 网站的主页似乎显示正确,但如果您点击进入任何其他页面,我会收到以下错误消息:
Not Found
The requested URL /about was not found on this server.
Apache/2 Server at www.wildlionmedia.co.uk Port 80
我不确定这是主题的问题还是 .htaccess 文件没有被正确重写的问题。
http://www.wildlionmedia.co.uk/
有什么想法可以解决这个问题吗?
# Switch rewrite engine off in case this was installed under HostPay.
RewriteEngine On
SetEnv DEFAULT_PHP_VERSION 53
DirectoryIndex index.cgi index.php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /wildlionmedia.co.uk/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wildlionmedia.co.uk/index.php [L]
</IfModule>
# END WordPress
最佳答案
如果以上几点都不起作用。那就试试这个吧。我尝试过这个。它对我有用。
- 转至/etc/httpd/conf/httpd.conf。
- 将 AllowOverride None 更改为 AllowOverride All。
- 重新启动 apache 服务器。
2017 年更新
对于新版本的 apache,该文件称为 apache2.conf
因此,要访问该文件,请输入 sudo nano/etc/apache2/apache2.conf 并更改 block <Directory /var/www >
内的相应行
关于wordpress - 在此服务器上找不到请求的 URL/about,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13149418/