Search

What the Quote?

"I myself am often surprised at how well-adjusted I actually am."

Tim Tripcony

"Really? You can go to the store all by yourself now? Just you and Linux?"

Laura Tripcony

"You're giving Mommy a face bath... so now she'll stink like you."

Tim Tripcony

« upgrade to RYOML (roll your own markup language) | Main| occupational dialects »

case mismatch can cause broken links and images on a Linux server

Category linux
By now most people know that, when planning to move a Domino server from Windows to Linux, it's a good idea to check all code for backslashes (\), because Linux uses forward slashes (/) instead. But an oft-overlooked reality is that filepaths in Linux are also case-sensitive: /stuff/ and /Stuff/, for example, are two entirely different folders. Hence, if your server contains a folder inside /data/domino/html for centralized storage of script, CSS, images, etc., for example, any links to those files need to use the correct case or those links will be broken. While I'm a big fan of camel case for class and variable names in code, I prefer lower case paths for files; by all means, feel free to use camel, but keep in mind that every time you reference the path you'll need to remember whether you used standard camel (i.e. CamelCase) or lower camel (i.e. camelCase) or you're in for a boatload of 404's.

Comments

Gravatar Image1 - It also appears that Domino caches the case of the files. Accessing the correct path /directory/db.nsf/view/document once means that you can then access /Directory/DB.nsf/view/document and get the same file as long as Domino caches it. Makes it harder to find the problem when the customer calls, complaining that it works "sometimes".

Gravatar Image2 - Something else that works but is VERY tedious is redirect documents for all these cases. A while back when hosting my own website myself, I was moving stuff around and couldn't really make up my mind on what to run my blog in, what platform, heck anything really. So, I got very proficient at creating redirection documents to make up for lack of commitment to a single platform/blog software/web engine/etc.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)