Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    2
    Member #
    24057
    Hopefully this is the right forum for this question. I've been looking at my web pages and have notices that I am required to type .html at the end of any page other than the main page. Is there a line of code I need to add to the head of the page? Any help would be greatly appreciated.

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    I am not sure exactly what you are asking - every web page (file) has to have some sort of an extension - .htm, .html, .php, .js, .css and so on. This allows the browser to know how to treat that file.

    As to adding a line of code to the head of the page - do you have a DOCTYPE specified? If you could post a link or an example of your code it would help.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    etm
    etm is offline
    Member
    Join Date
    Aug 2010
    Location
    Calgary, Canada
    Posts
    76
    Member #
    23011
    Do you mean when you type in a domain name the home pages loads automatically? The home page is set within your web server, typically index.html, sometimes default.html or home.html. Also could be other extensions depending on what you are running (aspx, php etc.)

  5. #4
    Junior Member
    Join Date
    Oct 2010
    Posts
    2
    Member #
    24057
    Yea it looks like my original post wasn't very descriptive of the problem.


    The problem I have is that whenever I try to directly access a webpage other than my main page I have to type in the full url with the .html at the end. My page is OSEUSA.COM. If I want to go to the products page directly I need to type in OSEUSA.COM/products.html . Is there a way to get to that page without having to type the .html is what I'm trying to determine.

  6. #5
    etm
    etm is offline
    Member
    Join Date
    Aug 2010
    Location
    Calgary, Canada
    Posts
    76
    Member #
    23011
    Well, no, there is a reason the extensions are there. Not having an extension typically represents a directory name, not a file name. If you want that, then create a directory for each section and call your page index.html within. That will allow you to do what you want.

    So if you want your URL to be mydomain.com/products than rename your products.html page to index.html and move it to a folder called products. Since index.html is the default page looked for by the server when one is not specified, it will load it automatically like your home page does.

    You might also be able do something with "mod_rewrite" (google it for more info).

  7. #6
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    You could do as suggested above - it seems like an awful lot of work to go to just to avoid typing ".html"

    What is your reason for wanting to be able to get to the pages wothout using the extension?
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  8. #7
    Junior Member
    Join Date
    Oct 2010
    Posts
    7
    Member #
    24084
    Quote Originally Posted by AlphaMare View Post
    You could do as suggested above - it seems like an awful lot of work to go to just to avoid typing ".html"

    What is your reason for wanting to be able to get to the pages wothout using the extension?
    I agree.

    I think he was just looking for a quick fix. It sounds like one of those things where if there's a quick fix for it then great, if not then i'll just suck it up. At least that's how I feel.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:31 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com