Now I have two ways to store web contents in the file system:[...]
classical: the URL <domain>/a/b/c is served from file <doc-root>/a/b/c/index.ext
which a suitable file extension (as a means to determine the content type), typically .html
abbreviated: the URL <domain>/a/b/c is served from file <doc-root>/a/b/c.ext provided that there is no directory /a/b/c
Are there any other reasons to prefer one of the methods over the other?
Helmut Richter, 2023-01-02 15:35:
[...]
Now I have two ways to store web contents in the file system:
classical: the URL <domain>/a/b/c is served from file <doc-root>/a/b/c/index.ext
which a suitable file extension (as a means to determine the content type), typically .html
abbreviated: the URL <domain>/a/b/c is served from file <doc-root>/a/b/c.ext[...]
provided that there is no directory /a/b/c
Are there any other reasons to prefer one of the methods over the other?
I would stick with <doc-root>/a/b/c/index.ext and not allow the
alternative <doc-root>/a/b/c.ext for the same URL to avoid confusion
what <doc-root>/a/b/c means in your filesystem.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 41:40:00 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,857,792 |