PDA

View Full Version : embarrasing html question


pilateezee
07-29-2002, 03:44 PM
Okay, I DO code html, Dreamweaver, yadayadayada so I'm rrreeeaaallyy embarrassed by my question.

Here goes, I know all files need the html code extension, what I don't know is how I can keep them from appearing in the address.

i.e. to point to my news page without linking through my site, why must I specify www.domainname.com/news.html

How do I have www.domainname.com/news go to the page?
I hate having to include the .html - looks really stupid in pring - and I see it done by others, just can't figure it out.

Guess it's so basic it isn't included in any of my books or in the tutorials ... ugh!

Help in Illinois,
pilateezee

Terence
07-29-2002, 04:02 PM
Make a directory "news" and place your news page as "index.html" under the "news" directory.

Now you can link to your news page using http://www.yoursite.com/news/.

Matt
07-29-2002, 05:39 PM
An alternative would be to create a gzipped version of your file named *.html.gz and add the following lines to your .htaccess file:
Options MultiViews
DirectoryIndex index

You can now load the page without having to specify .html and an additional benefit is that if your visitor's browser supports gzip, the pages should load faster. -Matt

Grendel
08-15-2002, 04:13 PM
Make a directory "news" and place your news page as "index.html" under the "news" directory.
Another advantage of this method is that you can hide the implementation of your web pages. For example, you could switch from .html to .shtml or .php without breaking anyone's links... as long as the webserver is configured to serve up multiple types of index files. Which FQ is.