• Welcome! The TrekBBS is the number one place to chat about Star Trek with like-minded fans.
    If you are not already a member then please register an account and join in the discussion!

Web development

Understood thanks!

One last quick question...

Why do I come across some personal website portfolios that have urls like:

www.something.com/portfolio
www.something.com/photos

I thought every page had to end in .html or .php - what file would a URL to the above links be pointing to exactly?

Any thoughts?

They are what you call search engine friendly URL's. Forget that for the momment if you are just starting, thats pretty advanced stuff.
 
Understood thanks!

One last quick question...

Why do I come across some personal website portfolios that have urls like:

www.something.com/portfolio
www.something.com/photos

I thought every page had to end in .html or .php - what file would a URL to the above links be pointing to exactly?

Any thoughts?
There are actually a number of common extensions beyond .html and .php recognized by browsers (.htm, .asp, .jsp, .cfm, etc...). Generally speaking if there is no file extension at the end of the path, it's assumed your working out of a directory. Your webserver will then scan that directory file for a special index file (usually index.html, index.htm, index.php, index.asp, etc...). And it will be this file that you are actually seeing (www.something.com/portfolio probably equals www.something.com/portfolio/index.html) Controlling this is called the directoryindex and the priority of these files can be changed by a special file called .htaccess.

There are also something called URL rewriting which is a bit more complicated but is interesting stuff that you can all controll with a .htaccess file. Here is a primer: http://corz.org/serv/tricks/htaccess2.php
 
I have a iMac server, so you just write a line in apache saying what the start file is.
 
If you are not already a member then please register an account and join in the discussion!

Sign up / Register


Back
Top