basecamp / pow

Zero-configuration Rack server for Mac OS X
http://pow.cx/
MIT License
3.41k stars 259 forks source link

Some index.html file in public folder are not served #461

Open timnew opened 10 years ago

timnew commented 10 years ago

I have a static site with a public folder. And I found all the files under public/archives/ are not served by pow. But other files served correctly.

I found the reason is that the the /some/path/index.html is not served automatically when I access /some/path. Some others works fine. Not sure why.

timnew commented 10 years ago

I found the rule. Suppose I have /some/path/index.html file. If I access /some/path/, /some/path/index.html is served. But if I access /some/path, then I'll get 404.

guidobouman commented 10 years ago

Urls ending with a slash expect the last part to be a directory, the directory path in your case. Urls ending without a slash expect the last part to be a file, a file called path.

When a server is looking for a directory it tries to find a default file (usually index.html) within that directory it can serve back to the client.

Everything is behaving as expected. :)