简体   繁体   中英

How to stop Apache redirecting to index.html

I have a Django app that I am serving with Apache using uwsgi.

When I go to http://www.myserver.com/

Apache redirects me to http://www.myserver.com/index.html/

Which then gives me an error "page not found" (the site does not use an index.html page).

The other URLs work fine, eg http://www.myserver.com/mystuff - is correctly served.

How can I stop Apache redirecting the start site to index.html

There are 2 places to look for the problem:

  • httpd.conf, .htaccess - both are apache web server configuration files.
  • 301 redirects(if you used any before). If you had any, you won't get to your root url unless you purge browser url routing cache(clearing browser data on chrome doesn't help, for example). How to do that - depends on your browser. To read more on that topic http://getluky.net/2010/12/14/301-redirects-cannot-be-undon/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM