如何阻止Apache重定向到index.html

时间:2017-01-23 13:43:34

标签: django apache

我有一个Django应用程序,我使用uwsgi为Apache服务。

当我去的时候 http://www.myserver.com/

Apache将我重定向到 http://www.myserver.com/index.html/

然后给我一个错误"找不到页面" (该网站不使用index.html页面。)

其他网址正常,例如http://www.myserver.com/mystuff - 已正确投放。

如何阻止Apache将起始站点重定向到index.html

1 个答案:

答案 0 :(得分:2)

有两个地方可以找到问题:

  • httpd.conf,.htaccess - 都是apache web服务器配置文件。
  • 301重定向(如果您之前使用过任何内容)。如果您有任何内容,除非您清除浏览器URL路由缓存(例如,清除Chrome上的浏览器数据并不提供帮助),否则您将无法访问根URL。怎么做 - 取决于您的浏览器。要详细了解该主题http://getluky.net/2010/12/14/301-redirects-cannot-be-undon/