Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

e7e

macrumors member
Original poster
Dec 15, 2007
53
0
Hello

I see some webpages don't have an extension like .html, .asp or .php for example: http://somepage.com/MacIsGood Can someone please explain to me

How you can make your site like this? and Whats the point of this method?

Thanks in advance.
 
Webservers can identify (in a config file usually) the default name of a file to look for in any given directory. For Apache, which serves the majority of the internet, the default page is index.html Which means, http://somepage.com/MacIsGood is actually looking at http://somepage.com/MacIsGood/index.html (for my example).

As for the advantages to doing it this way? I don't know other than naming conventions and consistency.
 
some of the CMS's use a 'clean url' strategy.

so something like:

myurl.com/blog/thisthing

is really

myurl.com/index.php?feature=blog&entry=thisthing

this is done with .htacess and the specific PHP files.
 
Interesting, do you know any tutorials or guides? I tried to google, but didn't find anything useful searching "sites without extension" does this method have a name?
 
When I was hosting my site on my computer I had something like this

Code:
www/
  index.html
  css/
    [css themes]
  php/
    [php scripts]
  images/
    [global images]
  blog/
    index.html
  photos/
    index.html
  vitae
    index.html
  contact/
    index.html

This way, I could simply link to www.domain.com/blog/ and www.domain.com/photos/ to go to my blog and photos respectively without explicitly giving it the name of the html file.
 
Thanks for all the tip and explanations, I am going to try this out. :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.