Wordpress:URL错误404,但页面存在

时间:2010-07-12 23:18:35

标签: wordpress url-rewriting url-routing http-status-code-404

我将我的wordpress(3.0)博客移到我的专用服务器上。

只有一件事被打破了:

如果我将worpress中的url设置为

http://wwww.example.com/page?id=3

页面正确显示

如果我将网址设置为:

http://wwww.example.com/about/
http://www.example.com/services/

最终会找到404找不到的页面!!

如果有帮助,这是我的虚拟主机:

<VirtualHost *:80>
   ServerAdmin webmaster@localhost
   ServerName www.example.fr

    DocumentRoot /var/www/example
    <Directory /var/www/example>
            Options -Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>


    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access-example.log combined
    ErrorLog /var/log/apache2/error-example.log
    ServerSignature Off
</VirtualHost>

谢谢你

3 个答案:

答案 0 :(得分:7)

Wordpress使用.htaccess进行重定向,您是否尝试将AllowOverride None指令更改为AllowOverride All

答案 1 :(得分:1)

听起来您的新服务器未设置为将您的网址重写为漂亮的链接。您基本上想要遵循此设置页面上的指南:

http://codex.wordpress.org/Using_Permalinks

答案 2 :(得分:0)

我发现要注意的一件事 - 除了正确配置的.htaccess,httpd-vhosts.conf等之外 - 还要检查服务器的http.conf中是否启用了mod_rewrite。只需确保取消注释此行:

LoadModule rewrite_module lib / httpd / modules / mod_rewrite.so

相关问题