4

我把我的wordpress(3.0)博客移动到我的专用服务器。WordPress的:URL错误404,但网页存在

只有一件事被打破:

,如果我在worpress设置的URL是

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

页面显示正确

如果我设定的网址是:

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

它结束了404未找到的页面!

这里是我的虚拟主机,如果它可以帮助:你

+0

听起来像mod_rewrite的问题 - 您使用WordPress的永久链接?你有没有检入.htaccess文件? – DeaconDesperado 2010-07-12 23:22:22

回答

8

WordPress使用的.htaccess来完成其重定向

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    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> 

谢谢,你有没有试图改变AllowOverride None指令AllowOverride All

+0

我刚才尝试过AllowOverride All,它可以正常工作!非常感谢 ;) – 2010-07-12 23:31:52

0

我发现一件事情,就是看的 - 从一个正确配置的.htaccess,的httpd-vhosts.conf等相当一边 - 是检查服务器的http.conf中是否启用了mod_rewrite。只要确保此行是注释掉:

的LoadModule rewrite_module的lib/httpd的/模块/ mod_rewrite.so