2

So I have a few different channels for different types of content.

One called pages which is just for regular web pages. All of those entries work uppercase or lowercase so example.com/About and example.com/about both work.

The Entry URL Format for pages is

{slug}

The Entry Template is

/_page

I have a problem with a few of my channels for blog entries and I believe it is because of the Entry URL Format being used, but at the same time that doesn't make sense since it works fine for the page channel. Example channel is called Articles and the Entry URL Format is

articles/{postDate.year}/{slug}

And the Entry Template is

articles/_entry

The main Articles page which shows the index of all articles etc is using

articles/index.html

in the articles directory which is probably causing the problem.

So the problem ends up being that example.com/articles works but example.com/Articles does not and goes to a 404. Now if I am inside of a single entry it can have caps so example.com/Articles/this-is-an-Article works.

This is hosted on a linux server. Only reason I mention that is because how linux handles cases differently, on the staging server which is windows they all work fine. So not sure if I would need to setup 301's for those blog channels using the index.html files inside each channel folder. Or if there is another way of handling this. Possibly a route, or a single but I don't see why that would be needed.

I have some singles setup like this as well but they work with or without caps... so something seems odd about these channels.

Anyone have any thoughts on that.

  • Is there a good reason to have casing like that? It's better practice to use lowercase. – Mark Busnelli Jr Jul 11 '15 at 0:34
  • I agree and always do but client was concerned about it. – Bowenac Jul 11 '15 at 4:23
3

It's not just Windows / Linux / OSX that have different file system case sensitivities, but even different distributions of Linux can have them. Or the same distribution, but with different file systems. Or the same distribution and same file system, but one has been configured to be case sensitive and the case insensitive.

Instead of accounting for all of the different possibilities for a given route (example.com/articles, example.com/Articles, example.com/aRticles, example.com/ArTiClEs), it's going to be much less of a headache to just force lowercase at the web server level.

2

This is a server-side configuration issue, not a Craft issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.