Gone dotty

W

William Tasso

Hello one and all

Just been wondering - you know how it is when you stare at a problem for too
long - is there anything in a relevant spec or common usage which would
prevent a URL having more than one dot? for example:
http://www.example.com/test.file.html

Thanks
 
T

Tina - AffordableHOST.com

William Tasso said:
Hello one and all

Just been wondering - you know how it is when you stare at a problem for too
long - is there anything in a relevant spec or common usage which would
prevent a URL having more than one dot? for example:
http://www.example.com/test.file.html


Probably because the server isn't setup to recognize that as a valid file
extension.

--Tina
 
T

Toby A Inkster

Just been wondering - you know how it is when you stare at a problem for too
long - is there anything in a relevant spec or common usage which would
prevent a URL having more than one dot?

No, in fact, it's quite common to have more than one dot. Let's look
around a made up site for Example Inc's latest piece of software...

Language negotiation with Apache:

http://www.example.org/docs/index.html.en (English documentation)
http://www.example.org/docs/index.html.fr (French documentation)
http://www.example.org/docs/index.html (Auto-detect language)


Downloads often include dots in version numbers:

http://www.example.org/downloads/windows/foobar-1.2.1.zip


Common Unix archive formats often have multiple dots in the file extension:

http://www.example.org/downloads/linux/foobar-1.2.1.tar.gz
http://www.example.org/downloads/linux/foobar-1.2.1.i386.rpm
http://www.example.org/downloads/linux/foobar-1.2.1.src.rpm
 
W

William Tasso

Toby said:
No, in fact, it's quite common to have more than one dot. ...

Thanks all

I know it works on my set up - just wanted to be sure it was legit.

/continues going dotty ...............
 
J

Jacqui or (maybe) Pete

Probably because the server isn't setup to recognize that as a valid file
extension.
Your servers seem to be happy enough with eg :

http://porjes.com/one.x.y.z...html

(with no htaccess changes at all - that works 'right out of the box')

However, I failed to get 'porjes.com/well......blimey' to be recognised
as html even with .htaccess frigging - perhaps brucie or Mr Dorward (or
whoever) would tell us the .htaccess magic required for that?

Of course the truth, as I've slowly come to understand, is that a
webserver program can interpret (what look like) path and file names in
any way it pleases.
 
B

Bill Logan

Bill Logan said:
A useful, if simplistic definition of legal urls but with links to
authoritative (official?) standards
http://webtips.dantobias.com/url.html
Sorry William, should have mentioned,
Scroll down to the bottom of the linked page above to get direct to the
example stuff.

The dot notation in an URL or uri is used to separate labels. e.g.
http://subdomain.mydomain.com
in this case level 3, 2 and 1 in the domain list.

In some instances dots in the path part of the url as in
/mydir1/my.file.html
will be stripped by some applications to read /mydir1/myfile.html or
/mydir1/my/file.html

So probably best to avoid - ie rename the file

Also it is interesting to note that the dot is an 'unreserved' character.
 
W

William Tasso

Bill said:
Not my day :)

On this occaision - I'm so glad ;o)
multiple dots will also work in the filename so they will work as
separators of the labels, in the file name but not necessarily in the
path or the host descriptor

I just spent 10 minutes (not including the time spent page-scanning),
composing a reply to your last - oh well, it seems there is general
agreement that dots can be used as I want to use them so I guess I'm a happy
bunny.
 
W

William Tasso

Jacqui said:
Your servers seem to be happy enough with eg :

http://porjes.com/one.x.y.z...html

(with no htaccess changes at all - that works 'right out of the box')
although Mozilla (1.3.1) gets bent out of shape.
Source:
Of course the truth, as I've slowly come to understand, is that a
webserver program can interpret (what look like) path and file names
in any way it pleases.

the web server does seem to be the key - probably because it has to interact
with the server file system.
 
A

Art Sackett

In alt.html Tina - AffordableHOST.com said:
Probably because the server isn't setup to recognize that as a valid file
extension.

Do you know of a server that cares about "valid" file extensions? Which
server software is it that does that?

Inquiring minds want to know!
 
A

Art Sackett

In alt.html William Tasso said:
although Mozilla (1.3.1) gets bent out of shape.
Source:
<html><body></body></html>

Mozilla 1.4/Linux found a custom 404 document at that URL, but seemed
happy enough to display it.
 
B

Bill Logan

William Tasso said:
On this occaision - I'm so glad ;o)


I just spent 10 minutes (not including the time spent page-scanning),
composing a reply to your last - oh well, it seems there is general
agreement that dots can be used as I want to use them so I guess I'm a happy
bunny.
Boy it IS one of those days!
I would also like to be a happy bunny . . . . . but . . . . .
Spent most of the day fixing the car, finally discovered the problem was a
blocked fuel filter hidden underneath the fuel tank. Not cleanable - must be
replaced, then I realised GST (vat to the poms) was due two days ago - if it
was not the weekend the tax people would have already sent an assessment for
around $40,000 (they tend to go overboard with assessments just to get your
attention) and YOU want to talk about dots!

excuse me I think I will just fade away into the background. . . . . ..
thank God tomorrows Monday.
 
J

Jacqui or (maybe) Pete

Mozilla 1.4/Linux found a custom 404 document at that URL, but seemed
happy enough to display it.
Sure it's not your newsreader breaking the url?
 
W

William Tasso

Jacqui said:
OK, I'm lost. Works fine for me in all browsers. Works on other
servers, too, eg:

http://porjes.haxorz.org/one.x.y.z...html

What's going on??

Not sure - ie6 and Opera get the 'hello world' ok

Lynx errors: Error uncompressing temporary file!

Lynx seems to display my test page alright, but not too conclusive as the
file with the extra dots is an image within the page. <
http://williamtasso.com/components/image.asp >

I tried your page on my windows server - returns 404 <
http://williamtasso.com/usenet/one.x.y.z...html >
and elsewhere: < http://wnt.ableinternet.com/one.x.y.z...html > gives me the
same result when I check yours.

Modifying the file name to this one.x.y.z.html and windows works ok:
<http://williamtasso.com/usenet/one.x.y.z.html> but Moz returns the same
empty source

Whilst there does seem to be a server issue for Windows (your example with
several consecutive dots doesn't even get picked up my my site map) I guess
the Moz thing is down to my installation although I can't see how - it's
probably trivial ;o)
 
N

'nuther Bob

Do you know of a server that cares about "valid" file extensions? Which
server software is it that does that?

Inquiring minds want to know!

The server uses the file extension to determine the MIME type sent
to the client. The browser uses the MIME type to decide how to
handle the file eg. reassemble a gif or jpg, interpret the html,
hand a .doc file off to another application, etc.

If the server can't figure out the file type, it most likely will
send the html MIME ... or perhaps just leave it up to the
browser to figure it out. That might account for the problems
some folks are having with extensions in this thread.

Bob
 
N

'nuther Bob

Not sure - ie6 and Opera get the 'hello world' ok

Lynx errors: Error uncompressing temporary file!

Lynx seems to display my test page alright, but not too conclusive as the
file with the extra dots is an image within the page. <

It appears that the server is not sending any MIME header at all.
Perhaps it has issues with determining the file type of the multi-dot
extension. That would confuse some browsers.

Bob
 
T

Toby A Inkster

If the server can't figure out the file type, [the server] most likely
will send the html MIME ... or perhaps just leave it up to the browser
to figure it out.

Actually, Apache defaults to 'text/plain', although this can be configured
using the 'DefaultType' directive in either the main Apache configuration
files, or an .htaccess file. For example:

DefaultType application/xhtml+xml

Also, there is an Apache module called mod_mime-magic, which will sniff
unknown files and guess which MIME type to send.

Lastly, one can assign MIME types without using an extension, for example:

<Location /images/potato-picture.gif>
ForceType image/jpeg
</Location>

in the main config file will send the MIME type 'image/jpeg' with the file
/images/potato-picture.gif. Why do this? Perhaps we used to have a GIF
file, but now have a JPEG file and we don't want to break links by
renaming it.

This last example illustrates that extensions are not only unneeded, but
also bad practice (although, admittedly bad practice that I fall into
myself!)
 

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

Forum statistics

Threads
473,812
Messages
2,569,694
Members
45,478
Latest member
dontilydondon

Latest Threads

Top