get the file name of a set index

J

Jan Faerber

David Dorward ... output:
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.
 
D

David Dorward

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.
 
J

Jan Faerber

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?
 
J

JDS

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.
 
D

David Dorward

Jan said:
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.
 
J

Jan Faerber

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.
 
J

Jan Faerber

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?
 
S

Steve Pugh

Jan Faerber said:
JDS ... output:


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
 
J

JDS


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.
 
J

Jan Faerber

JDS ... output:
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*.
 
D

David Dorward

JDS said:
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).
 
J

Jan Faerber

Steve Pugh ... output:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top