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. 错误的更多相关文章

  1. 【每日学习】Apache重写未开启,导致The requested URL /xxxx.html was not found on this server

    今天把项目环境从集成换成独立的,全部搭建好后,网站主页www.xxx.com能打开,但一涉及到跳转,带参数,比如 www.xxx.com/xxx/xxx.html 就会报错 The requested ...

  2. The requested URL /xxxx.html was not found on this server

    The requested URL /xxxx.html was not found on this server 的原因是,Apache没有开启重写 apache 打开 httpd.conf 文件找 ...

  3. windows 部署 git 服务器报 Please make sure you have the correct access rights and the repository exists.错误

    这两天在阿里云上弄windows 服务器,顺便部署了一个git服务.根据网上教程一步步操作下来,最后在 remote远程仓库的时候提示 fatal: 'yourpath/test.git' does ...

  4. webservice部署到服务器报错

    System.Net.WebException: 基础连接已经关闭: 发送时发生错误. ---> System.IO.IOException: 从传输流收到意外的 EOF 或 0 个字节. 在 ...

  5. linux下配置lamp时候出现The requested URL /info.php was not found on this server问题

    在经历修改各种配置文件和各种文件权限后,发现了怎么解决 On newer versions of Ubuntu, the document root is set to /var/www/html i ...

  6. (原)使用TortoiseGit提交代码push的时候报错:HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

    今天我想rk的sdk包里面的一些东西提交到我的git服务器上,结果,总是报错,折腾了一下午,结果才解决. 首先看看我提交代码的时候,报错的信息: git.exe push --progress &qu ...

  7. Object not found! The requested URL was not found on this server.... 报错解决方案

    服务器(centos6.5) lnmp 报错如下 Object not found! The requested URL was not found on this server. The link ...

  8. 配置ssh框架启动tomcat服务器报异常Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

    在Spring中配置jdbc时,引用的是dbcp.jar包,在db.properties配置文件中,使用了之前的properties配置文件的用户名username(MySql用户名) 然后在启动服务 ...

  9. php ci 报错 Object not found! The requested URL was not found on this server. If you entered the URL manually please check

    Object not found! The requested URL was not found on this server. The link on the referring page see ...

随机推荐

  1. 前端学习笔记系列一:4 vue中@click.native

    .native - listen for a native event on the root element of component. 作用:[给组件绑定原生事件] 例子:如果使用router-l ...

  2. springboot中文官方文档

    springboot中文官方文档 https://www.breakyizhan.com/springboot/3028.html spring框架 https://www.breakyizhan.c ...

  3. 机器学习算法中的网格搜索GridSearch实现(以k-近邻算法参数寻最优为例)

    机器学习算法参数的网格搜索实现: //2019.08.031.scikitlearn库中调用网格搜索的方法为:Grid search,它的搜索方式比较统一简单,其对于算法批判的标准比较复杂,是一种复合 ...

  4. SciPy 特殊函数

    章节 SciPy 介绍 SciPy 安装 SciPy 基础功能 SciPy 特殊函数 SciPy k均值聚类 SciPy 常量 SciPy fftpack(傅里叶变换) SciPy 积分 SciPy ...

  5. thinkphp5+python.apscheduler实现计划任务

    1.thinkphp5配置自定义命令行 /application/console/command namespace app\console\command; use think\console\Co ...

  6. 002-var_dump用法

    <?php $a = 2150; //小刘的工资2150 $b = 2240; //小李的工资2240 echo "a=" . $a . "  b=" . ...

  7. Web基础之Dubbo

    Dubbo RPC即Remote Procedure Call,即为远程调用.这和Java的远程代理RMI有点类似,不过RMI只能在Java系统之间进行调用,并且是使用序列化对象的方式进行通信.相比之 ...

  8. HDU - 3724 Encoded Barcodes (字典树)

    题意:给定n个字符串和m个经过处理得到的字符串,问对于m个字符串中的每个字符串,n个字符串中以该字符串为前缀的个数.分析:1.误差在[0.95x, 1.05x],因此求8个数的平均数,大于平均数为1, ...

  9. CAD转PDF再由pdf转jpg图片

    免费的PDF转JPG图片 https://www.gaitubao.com/pdf-to-jpg/

  10. Ajax学习系列——向服务器发送请求

    1.如何发送请求? 如果需要向服务器发送请求,我们使用的是XMLHttpRequest对象中的open()和send()方法. var xhr = new XMLHttpRequest();//具体创 ...