Why does SimpleHTTPServer redirect to ?querystring/ when I request ?querystring?
问题 I like to use Python's SimpleHTTPServer for local development of all kinds of web applications which require loading resources via Ajax calls etc. When I use query strings in my URLs, the server always redirects to the same URL with a slash appended. For example /folder/?id=1 redirects to /folder/?id=1/ using a HTTP 301 response. I simply start the server using python -m SimpleHTTPServer . Any idea how I could get rid of the redirecting behaviour? This is Python 2.7.2. 回答1: The right way to