get the file name of a set index

Discussion in 'HTML' started by Jan Faerber, Feb 16, 2005.

  1. Jan Faerber

    Jan Faerber Guest

    Jan Faerber, Feb 16, 2005
    #1
    1. Advertising

  2. Jan Faerber wrote:

    > http://www.savedatcash.com/x/d37/
    >
    > Can you get the file name for this page?


    Could be anything. Might not even be a file. Why would it matter to a
    visitor anyway?

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Feb 16, 2005
    #2
    1. Advertising

  3. Jan Faerber

    Jan Faerber Guest

    David Dorward ... output:

    > Jan Faerber wrote:
    >
    >> http://www.savedatcash.com/x/d37/
    >>
    >> Can you get the file name for this page?

    >
    > Could be anything. Might not even be a file. Why would it matter to a
    > visitor anyway?
    >


    Yes, anything. Could be anything. But what is it?
    Isn't it a file like that one:
    janfaerber.com/archiv/spam/mortage_www.savedatcash.com/x/d37/index.lsd

    I just want to save this file and I would like to use the same name as on
    their server.



    --
    Jan

    http://html.janfaerber.com
    Jan Faerber, Feb 16, 2005
    #3
  4. Jan Faerber wrote:

    >> Could be anything. Might not even be a file. Why would it matter to a
    >> visitor anyway?


    > Yes, anything. Could be anything. But what is it?


    There is no way to tell.

    > Isn't it a file like that one:
    > janfaerber.com/archiv/spam/mortage_www.savedatcash.com/x/d37/index.lsd


    It might be. It might not be.

    > I just want to save this file and I would like to use the same name as on
    > their server.


    Call it whatever you like and configure your system to recognise it. Call it
    __index.html if you want to have a name that is easy to recognise but
    unlikely to conflict with anything else you might see out there. Or store
    it on a filesystem (or in a database) which can say "blah/" is an HTML
    document.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Feb 16, 2005
    #4
  5. Jan Faerber

    Jan Faerber Guest

    David Dorward ... output:

    > Or store
    > it on a filesystem (or in a database) which can say "blah/" is an HTML
    > document.


    http://www.savedatcash.com/x/

    Here is the directory view where they have d37/ - it is not a html document.
    Or do you think it could be one but they use a gif for a directory because
    the name looks like one?

    I think with IE I could get this name by selecting 'save as...'. But with
    opera, mozilla & co. they don't get file names which fit with the real
    name.

    Or let me put the question in another way:
    Why must the visitor not know the name of such a file?
    For security reason?



    --
    Jan

    http://html.janfaerber.com
    Jan Faerber, Feb 16, 2005
    #5
  6. Jan Faerber

    JDS Guest

    On Wed, 16 Feb 2005 20:49:57 +0000, Jan Faerber wrote:

    > I think with IE I could get this name by selecting 'save as...'. But with
    > opera, mozilla & co. they don't get file names which fit with the real
    > name.
    >
    > Or let me put the question in another way:
    > Why must the visitor not know the name of such a file?
    > For security reason?


    In reality, you can never know for sure what the actual file name is on
    the server. It has nothing to do with the browser (MSIE vs Firefox, for
    example) and everything to do with how the web server is configured.

    A question for you is, what are you trying to do? There is more than one
    way to skin a cat, so to speak.

    --
    JDS | lid
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
    JDS, Feb 16, 2005
    #6
  7. Jan Faerber wrote:

    > http://www.savedatcash.irrelevant> Here is the directory view where they

    have d37/ - it is not a html
    > document. Or do you think it could be one but they use a gif for a
    > directory because the name looks like one?


    When a user makes a request for "http://www.savedatcash.com/x/d37/" the
    server will return a document. That the server thinks "On my
    filesystem /x/d37 is a directory, therefore I will look for a file called
    index.html inside it" is irrelevant.

    I've had systems set up where it would think "/x/d37? OK that means I have
    to call My::Apache::Module->hander('x', 'd37')". No file involved.

    > I think with IE I could get this name by selecting 'save as...'. But with
    > opera, mozilla & co. they don't get file names which fit with the real
    > name.


    I think you'll find that IE just guesses.

    > Or let me put the question in another way:
    > Why must the visitor not know the name of such a file?
    > For security reason?


    The filename isn't a secret, it is mearly so irrelevant so as to be not
    worth mentioning.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Feb 17, 2005
    #7
  8. Jan Faerber

    Jan Faerber Guest

    David Dorward ... output:

    > The filename isn't a secret, it is mearly so irrelevant so as to be not
    > worth mentioning.


    I did that now: http://bugs.php.net/bug.php?id=19113

    # telnet www.savedatcash.com 80
    Trying 218.30.123.56...
    Connected to www.savedatcash.com (218.30.123.56).
    Escape character is '^]'.
    CONNECT www.google.com:80 HTTP/1.0
    Host: www.savedatcash.com

    HTTP/1.0 403 Forbidden
    Server: Apache 2.0.48/SSL
    Mime-Version: 1.0
    Content-Type: text/html
    Content-Length: 289

    <html><head>
    <title>404 Not Found</title>
    </head><body>
    <h1>Not Found</h1>
    <p>The requested URL was not found on this server.</p>
    <hr />
    <address>Apache/2.0.48 (Gentoo/Linux) mod_ssl/2.0.48 OpenSSL/0.9.6j
    PHP/4.3.3 Server at localhost Port 80</address>
    </body></html>

    <BR>
    </BODY></HTML>
    Connection closed by foreign host.


    .... So why do I get here '404 Not Found' instead of '405 Method Not
    Allowed'? When I paste www.savedatcash.com into the browser I get a smilie.


    --
    Jan

    http://html.janfaerber.com
    Jan Faerber, Feb 17, 2005
    #8
  9. Jan Faerber

    Jan Faerber Guest

    Jan Faerber, Feb 17, 2005
    #9
  10. Jan Faerber

    Jan Faerber Guest

    JDS ... output:


    > In reality, you can never know for sure what the actual file name is on
    > the server. It has nothing to do with the browser (MSIE vs Firefox, for
    > example) and everything to do with how the web server is configured.


    So is THIS the difference between URI (= Uniform Ressource Identifier) and
    URL (= Uniform Ressource Locator)? A link to a directory in contrast to a
    link to a file in a directory?


    --
    Jan

    http://html.janfaerber.com
    Jan Faerber, Feb 17, 2005
    #10
  11. Jan Faerber

    Duende Guest

    While sitting in a puddle Jan Faerber scribbled in the mud:

    > ... So why do I get here '404 Not Found' instead of '405 Method Not
    > Allowed'? When I paste www.savedatcash.com into the browser I get a smilie.


    It's a happy page. :)

    --
    D?
    Adults die young.
    Duende, Feb 17, 2005
    #11
  12. Jan Faerber

    Steve Pugh Guest

    Jan Faerber <> wrote:
    >JDS ... output:
    >
    >> In reality, you can never know for sure what the actual file name is on
    >> the server. It has nothing to do with the browser (MSIE vs Firefox, for
    >> example) and everything to do with how the web server is configured.

    >
    >So is THIS the difference between URI (= Uniform Ressource Identifier) and
    >URL (= Uniform Ressource Locator)? A link to a directory in contrast to a
    >link to a file in a directory?


    No.
    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Feb 17, 2005
    #12
  13. Jan Faerber

    JDS Guest

    On Thu, 17 Feb 2005 09:04:23 +0000, Steve Pugh wrote:

    > No.


    Agreed.

    I don't know the technical difference between URI and URL. But that is not
    what I was talking about. A webserver can be configured to obfuscate the
    names of files and directories in ways which you cannot predict without
    talkign to the webserver admin. *That's* waht I'm talking about.

    --
    JDS |
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
    JDS, Feb 17, 2005
    #13
  14. Jan Faerber

    Jan Faerber Guest

    JDS ... output:

    > On Thu, 17 Feb 2005 09:04:23 +0000, Steve Pugh wrote:
    >
    >> No.

    >
    > Agreed.
    >
    > I don't know the technical difference between URI and URL. But that is not
    > what I was talking about. A webserver can be configured to obfuscate the
    > names of files and directories in ways which you cannot predict without
    > talkign to the webserver admin. *That's* waht I'm talking about.
    >


    You mean *security by obscurity*.



    --
    Jan

    http://html.janfaerber.com
    Jan Faerber, Feb 17, 2005
    #14
  15. JDS wrote:

    > I don't know the technical difference between URI and URL. But that is not
    > what I was talking about. A webserver can be configured to obfuscate the
    > names of files and directories in ways which you cannot predict without
    > talkign to the webserver admin.


    And usually that obfuscation is done for reasons more sensible then wanting
    to hide file names from users (i.e. the obfuscation is an irrelevant
    side-effect).

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Feb 17, 2005
    #15
  16. Jan Faerber

    JDS Guest

    JDS, Feb 17, 2005
    #16
  17. Jan Faerber

    Jan Faerber Guest

    Jan Faerber, Feb 19, 2005
    #17
  18. Jan Faerber

    Jan Faerber Guest

    Steve Pugh ... output:

    > Jan Faerber <> wrote:
    >>JDS ... output:
    >>
    >>> In reality, you can never know for sure what the actual file name is on
    >>> the server. It has nothing to do with the browser (MSIE vs Firefox, for
    >>> example) and everything to do with how the web server is configured.

    >>
    >>So is THIS the difference between URI (= Uniform Ressource Identifier) and
    >>URL (= Uniform Ressource Locator)? A link to a directory in contrast to a
    >>link to a file in a directory?

    >
    > No.
    > Steve
    >


    http://keystonewebsites.com/glossary/#u




    --
    Jan

    http://html.janfaerber.com
    Jan Faerber, Feb 19, 2005
    #18
  19. Jan Faerber

    Steve Pugh Guest

    Jan Faerber <> wrote:
    >Steve Pugh ... output:
    >> Jan Faerber <> wrote:
    >>>
    >>>So is THIS the difference between URI (= Uniform Ressource Identifier) and
    >>>URL (= Uniform Ressource Locator)? A link to a directory in contrast to a
    >>>link to a file in a directory?

    >>
    >> No.

    >
    >http://keystonewebsites.com/glossary/#u


    If that's the only resource you've been using no wonder you're
    confused about the difference between URL and URI.

    The two cases discussed up thread:
    http://www.example.com/foo/
    and
    http://www.example.com/foo/bar.html
    are both URLs and hence are both URIs (as URIs are a superset of
    URLs).

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Feb 19, 2005
    #19
  20. Jan Faerber

    Jan Faerber Guest

    Steve Pugh ... output:

    > Jan Faerber <> wrote:
    >>Steve Pugh ... output:
    >>> Jan Faerber <> wrote:
    >>>>
    >>>>So is THIS the difference between URI (= Uniform Ressource Identifier)
    >>>>and URL (= Uniform Ressource Locator)? A link to a directory in contrast
    >>>>to a link to a file in a directory?
    >>>
    >>> No.

    >>
    >>http://keystonewebsites.com/glossary/#u

    >
    > If that's the only resource you've been using no wonder you're
    > confused about the difference between URL and URI.
    >
    > The two cases discussed up thread:
    > http://www.example.com/foo/
    > and
    > http://www.example.com/foo/bar.html
    > are both URLs and hence are both URIs (as URIs are a superset of
    > URLs).
    >
    > Steve
    >


    OK - you are right - they structure it like this:

    .......URL
    /
    URI
    \ .......URN


    So is it then the difference between an URL and an URN?


    I found aswell other UR[x]s:
    PURLs, GURLs on:
    http://www.ou.edu/cas/slis/courses/LIS5990A/slis5990/Characteristics/URX.htm

    and then DOIS and ISP caching on:
    http://www.ou.edu/cas/slis/courses/LIS5990A/slis5990/stability/Archives.htm

    Maybe somewhere inside those definition lies the difference.



    --
    Jan

    http://html.janfaerber.com
    Jan Faerber, Feb 19, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWlrZQ==?=

    get value by index and not column name...

    =?Utf-8?B?TWlrZQ==?=, Feb 1, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,809
    Karl Seguin
    Feb 2, 2005
  2. ding feng
    Replies:
    2
    Views:
    2,783
    ding feng
    Jun 25, 2003
  3. Mike Schilling
    Replies:
    2
    Views:
    554
    Arne Vajhøj
    Mar 5, 2010
  4. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    266
    Tomasz Chmielewski
    Mar 4, 2008
  5. Replies:
    1
    Views:
    106
Loading...

Share This Page