dongmeng2687 2019-05-26 01:03 采纳率: 0%
浏览 909

求助:在服务器上找不到请求的URL / DIR / DIR

我将服务器操作系统从CentOS 7更改为Ubuntu18.4服务器,复制了所有文件,安装了一个新的Apache Web服务器,导入了DB。网站主页工作几乎都正常,但一旦我点击一个页面,就会得到404错误。 版本信息: PHP 7.2.17-0ubuntu0.18.04.1 Apache/2.4.29 (Ubuntu)

我在谷歌上搜索了一番,唯一可以追踪的是.htaccess文件出错了,所以我试了下WordPress文件,但仍然没有成功:

# 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

仅在站点上调用/Dir或直接调用时才出错404:

root@joeldig:/etc# apachectl -M
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php7_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 status_module (shared)
root@joeldig:/etc#
  • 写回答

1条回答 默认 最新

  • dplp5928 2019-05-26 01:33
    关注

    did you try to refresh the Permalinks? Under Settings

    评论

报告相同问题?

悬赏问题

  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
  • ¥20 Python安装cvxpy库出问题
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误
  • ¥15 python天天向上类似问题,但没有清零
  • ¥30 3天&7天&&15天&销量如何统计同一行
  • ¥30 帮我写一段可以读取LD2450数据并计算距离的Arduino代码
  • ¥15 C#调用python代码(python带有库)
  • ¥15 活动选择题。最多可以参加几个项目?
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题