解决“NOT FOUND The requested URL was not found on this server”

您所在的位置:网站首页 概率和统计的区别 解决“NOT FOUND The requested URL was not found on this server”

解决“NOT FOUND The requested URL was not found on this server”

2023-08-28 16:01| 来源: 网络整理| 查看: 265

萌新装tp5.1的操作过程中,遇到了“NOT FOUND The requested URL was not found on this server”提示,针对问题在网上找了许多没解决,后来在@小雨PP于2021-01-29 10:55:22发布的题为《解决laravel Internal Server Error The server encountered an internal error or misconfigu》文档中找到了解决方案,经测试可用。

RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

版本:thinkphp5,1

症状:

       首页可进入,但是关联的其他页面无法进入, 提示“The requested URL was not found on this server”

修改方法,将上述代码替换进“.htaccess”文件

修改文档位置:tp5.1根目录下的“.htaccess”文件

如果还不能解决,往下看

1,找到apache配置文件httpd.conf配置文件中的

AllowOverride none Require all denied

这两行,改成

      Options Indexes FollowSymLinks           AllowOverride All

2,找到apache配置文件httpd.conf配置并开启

LoadModule rewrite_module modules/mod_rewrite.so (如果存在这条,看看前面有没有“#”,有的话去掉)

PS:有其他问题随时留言



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3