【问题标题】:Why does my scripts return error 500?为什么我的脚本返回错误 500?
【发布时间】:2015-07-16 08:28:25
【问题描述】:

这不是一个真正的问题,但它让我有点困扰:)

长话短说:由于源 URL 如下所示,我的脚本无法加载:

<script src="http://www.example.com/Content/javascript/libs/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="http://www.example.com/Content/javascript/min/head-full-min.js" type="text/javascript"></script>
....

当我将 url 放入浏览器时,它显示 500 内部错误。但是,如果我将“内容”修改为“内容”,则脚本已正确加载并且一切正常。 我有 2 位同事没有问题(“内容”和“内容”正在为他们工作)。我检查了脚本的路径,类似于.../Content/javascript/...

解决方案很明显,但有人知道我的问题吗?此更改是否会影响其他人:“内容”->“内容”?

PS:我使用 IE 11、Firefox 39 和 Chrome 43 进行了测试,对于 3 也有同样的问题

谢谢。

【问题讨论】:

  • 听起来您的服务器中存在错误...如果找不到该文件,它应该返回 404,而不是 500 错误,并且您的服务器应该足够聪明,不会取决于文件系统的名称敏感性(或不敏感性),我怀疑这是根本问题。
  • 500 Internal Server Error: 服务器遇到了一个意外情况,导致它无法完成请求
  • 当然可以,但是如何解释我的另外 2 位同事在使用相同的 URL 时没有相同的问题? (我们正在开发类似的浏览器)
  • 打开他的水晶球的包装 因为...我们应该如何诊断您的服务器对您的客户端的请求的问题?检查服务器日志,在服务器上调试,...

标签: javascript url path


【解决方案1】:
The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the web site's server but the server could not be more specific on what the exact problem is.

There are several options you can try to fix it:
1.Reload the web page. You can do that by clicking the refresh/reload button, pressing F5, or trying the URL again from the address bar.
2.Clear your browser's cache. If there's a problem with the cached version of the page you're viewing, it could be causing HTTP 500 issues.
3.Delete your browser's cookies. Some 500 Internal Server Error issues can be corrected by deleting the cookies associated with the site you're getting the error on.

Try these options and check if they seem to make a difference.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-06-23
    • 2016-08-30
    • 1970-01-01
    • 2018-07-06
    • 2019-08-06
    • 1970-01-01
    • 1970-01-01
    • 2018-05-07
    相关资源
    最近更新 更多