nginx version: nginx/1.0.15
I have configed a static file server.
conf:
location /strategy/ {
root /www;
}
under the directory /www/strategy, there is a file named date.txt. which content is:
Tue May 22 11:23:47 CST 2018
I can get the right response with curl:
curl http://localhost/strategy/date.txt
but when i visit the URL(http://localhost/strategy/date.txt) in chrome, it was redirected to http://localhost/strategy/date.txt/
and then to http://localhost/strategy/date.txt/index.html,
then http://localhost/strategy/date.txt/index.html,
then http://localhost/strategy/date.txt/index.html/index.html,
then http://localhost/strategy/date.txt/index.html/index.html/index.html,
...
and so on.
Can anybody explain why? Thanks in advance!
I have configed a static file server.
conf:
location /strategy/ {
root /www;
}
under the directory /www/strategy, there is a file named date.txt. which content is:
Tue May 22 11:23:47 CST 2018
I can get the right response with curl:
curl http://localhost/strategy/date.txt
but when i visit the URL(http://localhost/strategy/date.txt) in chrome, it was redirected to http://localhost/strategy/date.txt/
and then to http://localhost/strategy/date.txt/index.html,
then http://localhost/strategy/date.txt/index.html,
then http://localhost/strategy/date.txt/index.html/index.html,
then http://localhost/strategy/date.txt/index.html/index.html/index.html,
...
and so on.
Can anybody explain why? Thanks in advance!