将.htaccess添加到网站时出现500服务器错误

时间:2016-01-30 21:42:47

标签: php apache .htaccess

我的网站托管在 GoDaddy 上。我想利用浏览器缓存,所以我添加了一个<img src="<%= Url.Action("ImageOutput", "home") %>" alt="my image" /> 文件。

当我这样做时,我的网站会返回500错误。我删除了htaccess文件,我的网站恢复正常。我错过了什么?这是我的htaccess文件:

htaccess

提前致谢

1 个答案:

答案 0 :(得分:3)

这是确切的res.send()文件吗?

  1. 您必须使用app.get("/download", function (req, res) { var location; var options = { host: 'example.com', port: 80, path: req.query.url.replace(/ /g, "%20") }; http.get(options, function (response) { // get location from this location = response.headers.location; console.log(location); res.setHeader('Content-Type', 'text/html'); res.send(location); }).on('error', function (e) { console.log("Got error: " + e.message); res.send('Error...') }); }); 而不是htaccess
  2. 来显示评论
  3. #更改为//
  4. 如果问题仍然存在,请尝试:

    1. ErrorDocument 404 404.php更改为ErrorDocument 404 /404.php
相关问题