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. 中国6G为什么要从现在上路?

    现在,通信5G的概念早已深入人心,正在从蓝图上的规划走向现实,平心而论,中国在2G/3G/4G时代都没有太突出的表现,或受制于人.或沦为跟随者,如今中国想翻身,于是从一开始就卯足了劲儿抢跑5G,不仅把 ...

  2. axios设置请求头失效的问题

    前言:因为在使用vue-element-admin框架时遇到了设置请求头失效的问题,在后来发现是代理跨域问题,所以又简单理解了一下跨域. 出现的问题是我在axios拦截器上设置了请求头token,但是 ...

  3. list中会直接绑定HashMap中的数据

    import java.util.ArrayList;import java.util.HashMap;import java.util.List; public class HashMapSync ...

  4. Day3-E-New Year Snowmen CodeForces140C

    As meticulous Gerald sets the table and caring Alexander sends the postcards, Sergey makes snowmen. ...

  5. pythono整数和字符串魔法方法

    1.整数(int) a = 1 b = 2 c = 3 d = 4 e = 5u a1 = a.bit_length() b1 = b.bit_length() c1 = c.bit_length() ...

  6. 算法:辗转相除法求最大公约数(C语言实现)

    辗转相除法,一种求最大公约数的算法 已知:A / B = C ······ R  (A.B.C.R皆是整数) 假设:D是A的余数,D也是B的余数,那么D就是A和B的公约数 D是A和B的约数,则A和B是 ...

  7. redis集群JedisCluster连接关闭问题

    JedisCluster连接关闭问题 set方法为例 //伪代码 JedisCluster jedisCluster = new JedisCluster(); jedisCluster.set(&q ...

  8. 15 SQL中的安全问题

    SQL中的安全问题     1.SQL注入         demo1:             SELECT * FROM user WHERE username = ? AND password ...

  9. ffmpeg 学习:000-概述和库的组成

    背景 ffmpeg bin工具 可能无法满足产品的使用,于是需要通过传参调用ffmpeg库,即在通过更底层的方式使用它. FFmpeg 介绍 FFmpeg是领先的多媒体框架,能够解码,编码,转码,复用 ...

  10. Windows驱动开发-符号链接和设备名

    windows下的设备是以"\Device\[设备名]”形式命名的. 例如磁盘分区的C盘,D盘的设备名称就是 "\Device\HarddiskVolume2” "\De ...