This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > April 2007 > hidden url





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author hidden url
ana

2007-04-20, 6:17 pm

Can somebody tell me how they do this:
I noticed that many web sites have url like this
http://www.surfpack.com/software/fileextension/
Whay we can't see at the end of this url the name of the file that we are
looking at like index.html or something?


SpaceGirl

2007-04-20, 6:17 pm

On Apr 20, 12:38 pm, "ana" <a...@vizualmedia.hr> wrote:
> Can somebody tell me how they do this:
> I noticed that many web sites have url like thishttp://www.surfpack.com/software/fileextension/
> Whay we can't see at the end of this url the name of the file that we are
> looking at like index.html or something?


The web server has a default document set, so whatever that document
is is being sent to the client. So, if index.html is the default
document, if I were to go to /thisfolder/thissubfolder/ without
specifying a filename, the web server would see if there is a file
called index.html in that folder. If there is, it sends this back to
the client. If not, it'd generate a 404.

Benjamin Niemann

2007-04-20, 6:17 pm

Hello,

ana wrote:
> Can somebody tell me how they do this:
> I noticed that many web sites have url like this
> http://www.surfpack.com/software/fileextension/
> Whay we can't see at the end of this url the name of the file that we are
> looking at like index.html or something?


In the most common case, the webserver is configured to look for a default
file (or a list of commonly used names), when the request URL points to a
directory.
So in the URL above, there is a directory 'software/fileextension' in the
webserver containing a file named like 'index.html' and the server is
configured to look to 'index.html' files (it may also
be 'index.htm', 'Default.htm', ... depending of the server config).
If your webserver is Apache you can use the 'DirectoryIndex' directive
<http://httpd.apache.org/docs/2.0/mo...#directoryindex> to
configure the name(s) of these default documents.

HTH

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
E-Star

2007-04-20, 6:17 pm

ana <anka@vizualmedia.hr> wrote:

> Can somebody tell me how they do this:
> I noticed that many web sites have url like this
> http://www.surfpack.com/software/fileextension/
> Whay we can't see at the end of this url the name of the file that we are
> looking at like index.html or something?


Did the link have the slash at the end of it?
My server does not require the extension to be placed on it.

Therefore: example.com/page equals example.com/page.html
Toby A Inkster

2007-04-23, 6:16 pm

SpaceGirl wrote:

> The web server has a default document set, so whatever that document
> is is being sent to the client. So, if index.html is the default
> document, if I were to go to /thisfolder/thissubfolder/ without
> specifying a filename, the web server would see if there is a file
> called index.html in that folder. If there is, it sends this back to
> the client. If not, it'd generate a 404.


It would not normally send a 404. It would normally either generate its
own index internally or, if configured otherwise, send a 403 error message.

That said, this is just the most common method that web servers map between
URLs and filenames. You can set up your server to handle URLs in any
number of different ways though. Consider, say:

http://tobyinkster.co.uk/blog/2007/...era-ogg-theora/

Is there a directory on my server called /blog/2007/04/20/opera-ogg-theora/?
No. There isn't even one called "blog". (Actually, OK, there is... but
it's elsewhere on the server and has nothing to do with tobyinkster.co.uk.)

--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
SpaceGirl

2007-04-23, 6:16 pm

On Apr 23, 11:53 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
> SpaceGirl wrote:
>
> It would not normally send a 404. It would normally either generate its
> own index internally or, if configured otherwise, send a 403 error message.


Nor would I! That was a mistake (I was sleepy). On our servers you'd
either get a directory list, or be redirected to a root page of
whatever site you're on -- or a 403.

> That said, this is just the most common method that web servers map between
> URLs and filenames. You can set up your server to handle URLs in any
> number of different ways though. Consider, say:
>
> http://tobyinkster.co.uk/blog/2007/...era-ogg-theora/
>
> Is there a directory on my server called /blog/2007/04/20/opera-ogg-theora/?
> No. There isn't even one called "blog". (Actually, OK, there is... but
> it's elsewhere on the server and has nothing to do with tobyinkster.co.uk.)


:)


Dan

2007-04-24, 10:17 pm

On Apr 20, 7:38 am, "ana" <a...@vizualmedia.hr> wrote:
> Can somebody tell me how they do this:
> I noticed that many web sites have url like thishttp://www.surfpack.com/software/fileextension/
> Whay we can't see at the end of this url the name of the file that we are
> looking at like index.html or something?


I've got some discussion of subdirectories and default index files
here:

http://webtips.dan.info/subdir.html

--
Dan

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews