5

Is there a way to make github pages case insensitive?

Or in jekyll to ensure all url's are lowercase?

For example this url is valid:

http://www.example.net/Vegas-2014.html

but this 404s

http://www.example.net/vegas-2014.html

I don't like that from a usability perspective. (think text messaging urls, typing them in, etc.)

I know I can fix this with permalink, but I'm wondering if there is a way to do it through configuration of Jekyll or pages or some other technique.

3
  • 1
    As a workaround, you could consider using the Jekyll plugin, jekyll-redirect-from which has been whitelisted for GitHub pages. Sep 15, 2014 at 15:44
  • Joel, thanks for pointing out jekyll-redirect-from is whitelisted. I didn't realize that. It doesn't seem to me it will help in this case as I could use the permalink field to make everything lowercase. I was hoping for a solution to auto-lowercase everything or to make everything case insensitive. From looking at jekyll-redirect it seems I would have to manually add every combo of the casing of letters to achieve a case insensitive appearance. Sep 16, 2014 at 0:10
  • Also answered here: stackoverflow.com/a/48389490/211672 Jan 25, 2018 at 19:07

1 Answer 1

6

Sorry but case-sensitiveness is a standard for URL that is respected in Unix/Linux world. Windows world in more case insensitive but it's another world ;-).

An Apache, Nginx or other open-source server is case-sensitive by default and can be configured to be case insensitive.

In the Jekyll/Github pages world, we must take care of our cases.

But maybe you can give try to Jekyll redirect from.

1
  • I realized the problem is with my post filenames. If I make them all lowercase I get the best behavior considering the circumstances - all lowercase so no mixed case. Sep 13, 2014 at 3:35

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.