| | |
|
|
|
Re: /xxx.html vs /xxx/index.html |
| message from DaveBlues on 21 Jul 2004 |
Originally posted by: Newsgroup User
You're in a dungeon of idiots. Escape while you can!
-Darrel
I gladly trade my programming integrity for a regular, weekly, FAT, paycheck!
If the website was perfect and only needed a few uploads here and there ...
they wouldn't need me and my pricetag ... they just outsource a few pages here
and there.
in other words, "Grasshopper,"...
I am the dungeon master!
Muwahahahahaha!
|
| Tripecac replied to DaveBlues on 21 Jul 2004 |
Where do you put your images, css, mp3s, etc?
At my work we put each type of file in its own directory within a particular
"area". Even html files go in an "html" subdirectory. If it were a static
site, users would will see the "/html/" in the url; this might seem redundant
to them (since the html files already have an ".html" extension). Fortunately,
work uses php so the users see completely different urls; the file organization
is visible to developers only.
Anyway, applied to a music site it would look like this:
/shared/images/banner.jpg --banner image, used all over the site
/shared/js/shared.js -- javascript used by lots of pages in different areas of
the site
/shared/css/shared.css -- css used all over the site
/albums/html/index.html -- the album list page
/albums/html/kind_of_blue.html
/albums/html/kind_of_blue_notes.html
/albums/html/scetches_of_spain.html
/albums/images/kind_of_blue_front_cover.jpg
/albums/js/albums.js -- javascript used by albums pages
/albums/css/albums.css -- shared by all albums pages
/albums/css/kind_of_blue.css -- used only by "Kind of Blue" page
If we decide to give each album its own directory, we'd do this:
/albums/html/index.html -- the album list page
/albums/css/albums.css -- shared by all albums pages
/albums/js/albums.js -- javascript used by albums pages
/kind_of_blue/html/index.html
/kind_of_blue/html/notes.html
/sketches_of_spain/html/index.html
/kind_of_blue/images/kind_of_blue_front_cover.jpg (or just front_cover.jpg)
/kind_of_blue/css/kind_of_blue.css
Of course, with the "super-shallow" approach, what happens if you have an
album with the same name as a song? You're stuck having to change the name of
the directory (xxx_album and xxx_song). Plus, what happens if you have
hundreds of songs and/or albums? Do you really want hundreds of directories
within your root directory? It would get harder and harder to find that
"shared" directory if you have to scroll through a bunch of "s*" directories.
Being able to nest individual album pages within an "albums" directory helps
keep the organization natural, IMO. Maybe we should make that a requirement.
So we need at least 3 levels:
/albums/kind_of_blue/html/index.html
/albums/kind_of_blue/html/notes.html
/albums/kind_of_blue/css/kind_of_blue.css
/albums/kind_of_blue/images/kind_of_blue_front_cover.jpg
Do we really want users to see "/html/" in the url, though? Hmmm....
|
| darrel replied to Tripecac on 22 Jul 2004 |
It sounds like you're trying to please both sides (developers vs. surfers)
with one solution. You can't. You're going to have to compromise somewhere
if you are not going to use URL rewriting.
Personally, if this is a huge site that is going to need a lot of updating,
then go with the URLs that make sense to the developers. Yea, the end-user
will have long URLs, but maybe you can fix that in the future with URL
rewriting.
-Darrel
|
|
Archived message: Re: /xxx.html vs /xxx/index.html (Macromedia Dreamweaver)