新部署到服务器 报 The requested URL /home/profession was not found on this server. 错误
Posted cap-rq
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了新部署到服务器 报 The requested URL /home/profession was not found on this server. 错误相关的知识,希望对你有一定的参考价值。
The requested URL /home/profession was not found on this server.
通过xxx.com, 首页可以正常访问,xxx.com/xx/xx 就出现 The requested URL xxx was not found on this server.
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
Ubuntu16.04模块在 /etc/apache2/mods-available 下,需要链接到 mods-enable 下
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
3.加在重写,站点缺少 .htaccess 文件(文件在public下,没有就新建)
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
以上是关于新部署到服务器 报 The requested URL /home/profession was not found on this server. 错误的主要内容,如果未能解决你的问题,请参考以下文章
ASP.NET MVC 复制MVC项目代码到同一个项目的时候报错The request for ‘home’ has found the following matching controll(代码片
微信退款时候报”请求被中止: 未能创建 SSL/TLS 安全通道“或”The request was aborted: Could not create SSL/TLS secure channel“
The difference between the request time and the current time is too large.阿里云oss上传图片报错
解决springMVC文件上传报错: The current request is not a multipart request