treehouse : what would you like to learn today?
Web Design Web Development iOS Development

URL ending question?

  • Hi this is my first post, mainly because my countless google searches have failed miserably.

    So all my site urls end in the file name that there on.
    i.e. mysite.com/index.html

    But i see sites that have there sites end in just the name of the site, as if its referring to just the folder.
    i.e. mysite.com/blog/

    here is one example of a real site that does this.
    http://www.danieloliver.co.uk/blog

    So my question is: How can this be done, and what is this technique called because it seems like it should be simple but i cant figure it out for the life of me.

    Thanks everyone
  • It's because the ACTUAL url is:

    mysite.com/blog/index.html

    But the "index.html" is the default, so it isn't shown in the url.
  • What TheDoc mentions may be correct (depending on the situation) but I believe you are wanting to research "url rewriting". You might want to start your research here: http://www.yourhtmlsource.com/sitemanag ... iting.html or here: http://www.roscripts.com/Pretty_URLs_-_ ... g-168.html.

    I'd suggest looking up the terms "url rewriting" and "apache mod_rewrite". You may be able to do some basic url rewriting though an apache .htaccess file too. A lot of CMS software has built in url rewriting.
  • Ben is very right. I should've gone a little deeper.
  • Much Thanks! Super Helpful ... I guess i just did know the right terms to search for.