17

I'm unable to find how I can map a single URL to a single static file. I tried:

location /feeds/seznam/ {
    alias /path/to/file/feed.xml;
}

but this does not work (in logs I see that it appends index.html to the path).

slm
  • 7,730
Bruce
  • 407

1 Answers1

16

Try this instead:

location /feeds/seznam/ {
    rewrite ^/feeds/seznam/$ /path/to/file/feed.xml;
}

References

slm
  • 7,730