PDA

View Full Version : Browser problem associated with file extensions?



Val
07-14-2007, 08:46 AM
While doing test runs of my website, I found that Firefox and Netscape are displaying the actual html code rather than reading it correctly and displaying the full webpage. (not surprising, IE and Safari are doing just fine)

I think my problem lies within the fact that I dropped the .html file extensions with the objective of having an easier link for people to remember and/or type.

For example:
www.decleenecreations.com/gallery
as opposed to
www.decleenecreations.com/gallery.html

Don't be afraid to tell me flat out if I'm breaking some cardinal rule of web building/file management. I've pretty much spent the last year learning from my mistakes just to create my first website. I also realize that this is all may be futile considing the low amount of traffic that my site will be getting.

Does anyone have any reasoning/suggestions other than to just put the file extensions back on?

Thanks!

charlesgan
07-14-2007, 09:29 AM
I think my problem lies within the fact that I dropped the .html file extensions with the objective of having an easier link for people to remember and/or type.

For example:
www.decleenecreations.com/gallery
as opposed to
www.decleenecreations.com/gallery.html

www.decleenecreations.com/gallery shows all the html coding. Not website.

www.decleenecreations.com/gallery.html is error 404 page.

if you looking to develop 'permalink'. Think you mess up something. The content should always called by index page, and "gallery" is a parameter to query content and show in index page body.

refer to wordpress as a simple example.

lazynitwit
07-14-2007, 09:48 AM
Try adding this to the .htaccess file:

DefaultType text/htmlThis will make all files without extensions, or with unknown extensions, to be treated as HTML files.

Alternatively, you can put the .html extension back and use

Options +MultiViews

Which will allow you to use www.decleenecreations.com/gallery (http://www.decleenecreations.com/gallery) or www.decleenecreations.com/gallery.html (http://www.decleenecreations.com/gallery.html)

Basil
07-18-2007, 04:48 AM
Most people would make a folder called gallery and put an index page in that..

Val
07-19-2007, 06:50 AM
Thanks for the help everyone. I put the extentions back on as a temp solution, but will be trying out these suggestions when I find some free time to fiddle with my site again.

Early Out
07-19-2007, 07:23 AM
Most people would make a folder called gallery and put an index page in that..Exactly. To elaborate, let's say you've got a page of dog pictures you want to show people. Instead of creating a dog.html file, and forcing people to go to http://www.yourdomain.com/dog.html, just create a dog subdirectory (under the default public_html directory). Now create an index.html that has your dog pictures, and put it into that dog directory. Users can now go to http://www.yourdomain.com/dog - they just go to the directory name, and the index.html is there by default, so they don't have to spell it out.