服务器(centos6.5) lnmp

报错如下

Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster. Error 404

看提示是URL地址错误。原因是没有设置服务器地址重写,或者是设置了.htaccess文件,但没有打开重写功能。

解决办法是增加一个.htaccess文件,里面加上重写规则

1.找到/opt/lampp/etc(根据自身所在位置) vi httpd.conf看看是否开启了url_rewrite模块,也就是httpd.conf  LoadModule rewrite_module modules/mod_rewrite.so 将前面的#去掉,如果没有这复制这段添加上去。
然后找到 AllowOverride all (默认是None !!!这个很重要)

2.在所需要进行rewrite的web的主目录下添加.htaccess文件,添加上一句话:RewriteEngine on 然后补写上自己所需的所需规则。

Object not found! The requested URL was not found on this server.... 报错解决方案的更多相关文章

  1. 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 ...

  2. 404 Not Found The requested URL * was not found on this server

    1. 把从SVNcheckout下来的代码搭建起来.CakePHP+mysql.改动数据库配置. 2. 配置虚拟主机,发现訪问不了/user/login这个URL,报这个错误:404 Not Foun ...

  3. The requested URL / was not found on this server——Apache配置虚拟域名后无法访问localhost

    今天为了做项目,在Apache中配置了项目域名,成功访问.但是忽然发现要访问localhost突然出现The requested URL / was not found on this server. ...

  4. Not Found The requested URL / was not found on this server.

    http://www.wanysys.cc/coding/php/800.html 今天在做本地PHP项目的时候,想把之前wampserver的本地虚拟服务器环境访问方式改为本地localhost访问 ...

  5. The requested URL / was not found on this server

    The requested URL / was not found on this server.原因:未打开Apache的重写功能#LoadModule rewrite_module modules ...

  6. Yii2.0 解决“the requested URL was not found on this server”问题

    在你下了 Yii 框架,配置完路由 urlManager 后,路由访问页面会报错“the requested URL was not found on this server”,url类似于这种“ht ...

  7. go Rails 知识点,Concepts Series:url和parameter; 建立Rails App Templates;报错页面debug; counter_cache

    Rails Concepts Series: https://gorails.com/series/rails-concepts 基本都是免费的 一些细小的知识点,很有帮助. URL和paramete ...

  8. wampserver 的Apache启动错误提示:The requested URL / was not found on this server.

    打开localhost显示以下错误 原因:之前我配置了虚拟主机,所以服务器是从虚拟环境访问的,localhost也就访问不到 解决方法:打开httpd.conf配置文件,将Include conf/e ...

  9. Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password]报错解决方法

    错误: 解决方法:

随机推荐

  1. Mac小白用户都能体验Windows应用的轻量级软件

    近期,苹果在WWDC大会上表示Mac电脑将转向ARM架构,这意味着为iPhone手机.iPad平板和Mac电脑应用APP提供了统一的可能性.也就是说,iPhone手机.iPad平板电脑的应用可能在Ma ...

  2. guitar pro 系列教程(六):Guitar Pro音频导出功能之RSE音源

    让我们继续进行guitar pro的教程 上一章节,我们讲解了guitar Pro的播放与显示功能,在Guita pro的音源选择中分为两类,一种是自带的RES高保真音源,一种是MIDI输入音源.如果 ...

  3. mock模拟接口返回数据

    mock,是python中模拟接口返回数据 1.安装 pip install mock import unittest from mock import Mock def add(a,b): pass ...

  4. JavaSE 学习笔记08丨网络编程

    Chapter 14. 网络编程 14.1 计算机网络入门 当前节的知识点只是一个概述,更具体.详细的内容放在 计算机网络 中. 14.1.1 软件结构 C/S结构(Client/Server结构): ...

  5. 蓝桥杯——螺旋折线(2018JavaB组第7题19分)

    螺旋折线(18JB-7-19') 如图p1.pgn所示的螺旋折线经过平面上所有整点恰好一次. 对于整点(X, Y),我们定义它到原点的距离dis(X, Y)是从原点到(X, Y)的螺旋折线段的长度. ...

  6. C语言讲义——内存管理

    动态分配内存 动态分配内存,在堆(heap)中分配. void *malloc(unsigned int num_bytes); 头文件 stdlib.h或malloc.h 向系统申请分配size个字 ...

  7. 红黑树、TreeMap、TreeSet

    事先声明以下代码基于JDK1.8版本 参考资料 大部分图片引自https://www.jianshu.com/p/e136ec79235c侵删 https://www.cnblogs.com/skyw ...

  8. C和指针课后练习题4

    1.下面表达式是否合法?如果合法,他执行什么任务? 3* x * x - 4 * x + 6; 合法;他只是执行了表达式求值,但是他的结果并不存于任何地方. 2.赋值语句的语法? 数据类型 变量名 = ...

  9. Django的静态文件的配置

    静态文件配置 STATIC_URL = '/static/' # 静态文件配置 STATICFILES_DIRS = [ os.path.join(BASE_DIR,'static') ] # 暴露给 ...

  10. 当vue.js与其他js文件同时引用导致页面不显示的问题

    作为一个萌新,昨天学习的过程中遇到了vuejs与其他js在共同页面时引用时冲突的问题 具体如下 虽然注意到了前后顺序,但是页面还是出不来东西 我知道现实开发中可能不是这么引用,但是学习中是这么引入的, ...