Why does Drupal not recommend adding .html or .htm to the end of a path or filename?
Hi,
I have tried searching for this under many different phrases to try and find an answer, but with no look.
I am new to drupal and I am a long time "static" website builder using dreamweaver and hand coding etc.
I am of the school that taught each web page should have a file extension and for html this is usually either .html or .htm
Now I know Drupal isn't a "static" system etc. However, I really can't understand why a path is usually suggested with .html or .htm
This is like this way throughout the drupal.org site itself and when working on my own drupal sites.
I much prefer to see a url address such as www.example.com/flowers.htm rather than www.example.com/flowers
It just seems good web practice to me, to add .html or .htm to the end of the path aliases I create in drupal.
People then know what exactly they are clicking on, or at least it seems familiar to them.
Can anyone shed any light on this and help out?
Thank you,
Sam

Um.... cause drupal pages
Um.... cause drupal pages are not static? They're not even 'files' in the pure sense of the word.
E
__________
Eric Aitala - f1m@f1m.com
The Formula 1 Modeling Website
www.f1m.com
I know that, but it doesn't
I know that, but it doesn't answer my question.
My guess is that if people
My guess is that if people were given some good reasons to do it, at least some would work on it. On the other hand, no reason is needed for not doing it.
I think you answer your own
I think you answer your own question when you say
That approach comes from when a web page was a file, as pointed out the pages from Drupal are not file based so a file extension does not make sense.
Hoever, If you want, you can
Hoever,
If you want, you can add wahatever extension you want .htm or .html or .php or .cms or anything that you fancy by using the contrib module pathauto.
What about when one is moving
What about when one is moving an existing static site over to drupal and you don't want to lose ANY inbound links etc?
Surely the most rock solid thing to do is to recreate the exact paths and file extensions in Drupal for the site.
I stand by the fact that most people still expect to see a .html or .htm etc. on the end of the address.
Then people then know what exactly they are clicking on and aren't left wondering.
Just some thoughts.
Sam
As profjk says there's
As profjk says there's nothing stopping you from creating whatever paths you want with the path module and you can make them automatically add .html with pathauto for new content. The original suggestion that having a file extension is a good practice isn't really supported by anything other than your preference.
The original suggestion that
You may well be right actually. I am new to drupal and it seems weird not to have a file extension on the end of everything. Others I have spoken too here think so as well.
Perhaps it is for the best.
> it seems weird not to have
> it seems weird not to have a file extension on the end of everything
Do you feel weird using google, wikipedia, myspace, facebook and youtube?
I'd suggest that since you don't seem to have noticed that >80% of modern
websites don't use an extension in the url, it couldn't of been very important
regarding usability or usefulness!
Not everybody uses the
Not everybody uses the websites you mention and thank you for not being "overly" sarcastic, just a little...
> just a little... :) I was
> just a little...
:) I was aiming for pious and astute.
Well keep up the good work
Well keep up the good work then :-)
most people still expect to
In my experience, "most people" think that the way to get a webpage is to type in the entire URL into a Yahoo search box. They NEVER understood the whole ".htm" thing, and the idea of going to abc.com/flower instead of abc.com/flower.html is just a simpler, more sensical thing to type.
(And of course, as others have mentioned: pathauto! It's the best.)
Yes it is simpler on the face
Yes it is simpler on the face of it. I guess I just have to get used to it.
Cheers!
there are reasons.
What is there to wonder about?
Seeing .jsp, .asp, .php, .html, .shtml, .pl, .cgi, .cf, .phtml, .htm, or no extension... does tell me a little about the site, but that' because I'm a techie. It's a web page - ask for it via http and you'll get it.
Anyway, the real answer to your confusion is that there are many valid, forward-thinking reasons why doing without extensions is tidier, and more correct. (that link is a CLASSIC read for web develpers)
There is only one reason to artificially pretend that the content you are serving is an HTML 'file' - and that's to support old links. Even that issue is better handled with a decent redirect/rewrite system. ... And would not have occurred in the first place if you'd been able to use clean URLs when the old site was built..
So you can just go ahead and label your pages however you want if you've got a site structured the old way. It's a bit incorrect (misleading about the content), but not terribly wrong.
If you've actually made sites by hand before now, you should by now have encountered the convention of finding URLs like
/about/that can serve the page called /about/index.htm . Using short URLs like that was recommended practice long before FrontPageTM was even invented and started wrecking the semantics by linking directly to /about/default.htm in the code all the time.If we could have done it tidily, we'd have been using content negotiation and no suffixes forever. But we didn't have the right tools a decade ago. Now we do. Use them.
.dan.
You are dman :-) Sorry, I
You are dman :-)
Sorry, I couldn't resist.
You have definitely clarified this issue for me and I appreciate it along with the other folks' replies.
I read you link and it was interesting.
Thank you very much.
Sam