Skip to content

great web hosting with Dreamhost


Get MTW by Email

Enter your Email


Powered by FeedBlitz


  • Syndicate RSS 2.0
  • Syndicate with Atom

Creative Commons License

Blog Directory - Add Link

NoSpec!

Feedburner!

Performancing

Blog Directory

get camino browser

GeoURL


File name fandango

You may develop your website on a Mac but chances are that it will be hosted on some other form of Unix server. BSD and Linux are the most common, and most of us don’t know or really care as long as the site works. But not knowing what operating system hosts our pages can make a difference in what characters a file or directory (folder) name can contain.

You, of course, know that web file names should contain no spaces and that words in a web file name should be separated by dashes – or underscores_. But what other characters can you use? Letters and numbers are generally good. Many other symbols are banned either because they can potentially insert nasty programs into the server or the OS simply can’t deal with them. OS X rejects one set of symbols in file names, Windows another and Linux still another. That doesn’t leave us with much, It’s probably not even a good idea to include apostrophies or quotation marks. Basically, you can’t puncutate web file names.

A good rule of thumb is to Avoid using these characaters for maximum portability:

Asterisk    *
Colon   :
Back slash  \
Forward slash   /
Less Than   <
Greater Than    >
Pipe    |
Quote   "
Question mark   ?
all non-printable characters

Even the period can be a problem if you begin a file name with it. Files like .htaccess are reserved for the operating system and are typically hidden from us.

The best advice seems to be, when in doubt, leave it out. If you don’t, the web server may not serve your pages properly, or if someone saves your page it may not display properly on their system.


Possibly related:

Leave a Comment

You must be logged in to post a comment.

Trackback this post  |  Subscribe to the comments via RSS Feed