- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我喜欢制作一个.htaccess文件来重定向从网站上收到的任何错误。
我已删除旧站点中的所有页面。但是我不知道人们在书中写了几页。
新的网页和网站的结构完全不同...因此,没有页面与旧的页面相同,更不用说索引文件从index.html更改为index.php。
所以这是我上传到服务器的.htaccess文件...
随时发表评论,并给我您的观点,您将做什么?
也许这是一个过大的杀伤力...但是有效!这是文件:
#404 - Not Found The requested URL was not found on this server
ErrorDocument 404 http://acecrodeo.com/new/01-acec.php?lang=fra
#400 - Bad Request Your browser sent a request that this server could not understand
ErrorDocument 400 http://acecrodeo.com/new/01-acec.php?lang=fra
#401 - Authorization Required This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
ErrorDocument 401 http://acecrodeo.com/new/01-acec.php?lang=fra
#403 - Forbidden You don't have permission to access on this server
ErrorDocument 403 http://acecrodeo.com/new/01-acec.php?lang=fra
#405 - Method Not Allowed The requested method GET is not allowed for the URL
ErrorDocument 405 http://acecrodeo.com/new/01-acec.php?lang=fra
#406 Not Acceptable
ErrorDocument 406 http://acecrodeo.com/new/01-acec.php?lang=fra
#409 Conflict
ErrorDocument 409 http://acecrodeo.com/new/01-acec.php?lang=fra
##413 - Request Entity Too Large The requested resource does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit
ErrorDocument 413 http://acecrodeo.com/new/01-acec.php?lang=fra
#414 - Request-URI Too Large The requested URL's length exceeds the capacity limit for this server
ErrorDocument 414 http://acecrodeo.com/new/01-acec.php?lang=fra
##500 - Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request
ErrorDocument 500 http://acecrodeo.com/new/01-acec.php?lang=fra
#501 - Method Not Implemented GET to URL not supported
ErrorDocument 501 http://acecrodeo.com/new/01-acec.php?lang=fra
# ------------ i am not sure the usefullness of these.. put it anyway !
#301 - Moved Permanently The document has moved URL here
ErrorDocument 301 http://acecrodeo.com/new/01-acec.php?lang=fra
#302 - Found The document has moved URL here
ErrorDocument 302 http://acecrodeo.com/new/01-acec.php?lang=fra
#303 - See Other The answer to your request is located URL here
ErrorDocument 302 http://acecrodeo.com/new/01-acec.php?lang=fra
#304 - Not Modified A cached copy will be used
ErrorDocument 304 http://acecrodeo.com/new/01-acec.php?lang=fra
#408 - Request Time-out Server timeout waiting for the HTTP request from the client
ErrorDocument 408 http://acecrodeo.com/new/01-acec.php?lang=fra
#410 - Gone The requested resource is no longer available on this server and there is no forwarding address. Please remove all references to this resource
ErrorDocument 410 http://acecrodeo.com/new/01-acec.php?lang=fra
#411 - Length Required A request of the requested method GET requires a valid Content-length
ErrorDocument 411 http://acecrodeo.com/new/01-acec.php?lang=fra
最佳答案
您应该知道,绝对URL会将原始错误状态代码更改为重定向状态代码:
Note that when you specify an
ErrorDocument
that points to a remote URL (ie. anything with a method such as http in front of it), Apache will send a redirect to the client to tell it where to find the document, even if the document ends up being on the same server. This has several implications, the most important being that the client will not receive the original error status code, but instead will receive a redirect status code. This in turn can confuse web robots and other clients which try to determine if a URL is valid using the status code. —ErrorDocument
Directive
404 Not Found
,而不是发送
302 Temporary Redirect
作为未找到资源的答案。
This website has moved to example.com. But due to a stupid change in the managment system, the old URIs can not be mapped to the new one. We apologize for this and hope you can find the page you were looking for.
关于.htaccess - .htaccess文件意见(howto),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/594439/
我有一个在 ASP.NET 中构建的 Web 应用程序,它具有以下安全要求: 必须能够与将唯一 key 传回应用程序以指示用户已通过第三方站点登录的主身份验证方案集成。 必须能够使用现有的用户/角色表
我一直在开发一个应用程序,但遇到了一些与我缺乏 Java IO 和数据持久性经验相关的限制。基本上我需要存储一些 Spinner 对象的信息。到目前为止,我已使用以下格式将每个 Spinner 的信息
Closed. This question is opinion-based。它当前不接受答案。
我已经设计网站很长时间了,只是使用渐变图像,对于小渐变,这似乎工作正常并且不会增加太多加载时间,但现在新的 CSS (webkit/moz/o) 有太多碎片/khtml,更不用说 ie 6,7,8,9
请评论和批评该方法。 场景:我在一个平面文件中有一个大型数据集(2 亿个条目)。数据的形式是 - 一个 10 位电话号码后跟 5-6 个二进制字段。每周我都会收到一个仅包含数据更改的 Delta 文件
我的组织正在考虑使用 PDFlib 在我们的 Java (Spring/Tomcat) 环境中动态创建 PDF 文件 ( http://www.pdflib.com/)。 有没有人可以分享关于这个库的
我想问一个关于在 .NET 中构建使用数据库数据的应用程序的问题。有许多技术和模式,我正在尝试将它们联系起来。 我正在构建一个带有本地数据库的桌面应用程序,因此我选择了 SQLServer CE +
首先声明一下,我不是一个专业的程序员,而是一个有需求并且必须学习的工程师。我总是一个人工作,所以只有我和我的七个 split 人格……我们作为一个团队工作得很好 :) 我的大部分工作都是用 C/For
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我需要一种机制,能够获取相当小的包含同步函数调用的 javascript 片段,并将其重写为异步 javascript。 例如,如果我有一个片段 someSyncFunction(); console
这与其说是一个问题,不如说是征求对这两种技术的意见。一些背景知识:我建议在企业项目上使用 JMS,客户回来谈论 ebXML。老实说,我不知道这是什么,从来没有在网上读到过它,也从未在任何地方听到任何人
只是想在这里征求一些意见。我想知道人们如何为 html 元素添加单独的效果。举个例子:你有三种大小相同的 h1 标题,但有些是黑色的,有些是金色的,有些是白色的。有些有文本阴影等。您会创建单独的 CS
多年来,我一直在使用 C、C++、C# 和其他几种语言进行编程,主要针对 Windows 和 Linux,但也针对嵌入式平台。最近开始做一些 iPhone 编程作为副项目,所以这是我自从我的 Appl
在 2009 年 7 月 C++0x meeting in Frankfurt , 决定 remove concepts来自 C++0x。就个人而言,我很失望,但我宁愿有一个可实现的 C++0x,也不
我从 friend 那里得到了关于 NoSQL 的两个意见。 第一:使用 NoSQL 来提高性能并保存偶尔更新的数据。仍然使用sql保存所有重要的dan交易数据。 第二:如果您真的不需要,请不要使用
tl;dr:我想知道有很多(目前超过 100 个,可能高达 1000/2000 或更多)主干 View (作为表格的一个单元格)是否太重了 我正在从事的项目围绕着规划 View 展开。每个用户一行,涵
我刚刚花了很多时间重新编写我的应用程序,将所有内容都放在代码中,而不是使用 Storyboard。主要是因为我想了解 Storyboard为我做了什么。 显然,我注意到我的文件的代码行数变得非常大。
我有一个应用程序当前在内存中保存所有状态。它从服务器获取大量 JSON 信息,然后将 JSON 值保存在内存中。每个JSONObject可以是 ~300 字节,并且可以有数千个这样的对象。 我只是使用
我只是好奇......我需要根据属性有条件地隐藏一个元素。我可以用基本的 javascript 做到这一点: document.getElementById('business_option').st
我是一名前端开发人员,我发现自己经常在 jsp View 层中工作,并且看到了很多将数据(模型)推送到 View 中的解决方案。最近我遇到了一个将数据拉入 jsp 的 taglib 解决方案,在我看来
我是一名优秀的程序员,十分优秀!