Why are Github project document page urls case sensitive? What are the negative effects?

前端 未结 5 855
南笙
南笙 2020-12-01 18:27

I Just uploaded a sample index.html page for my github project repo gh-pages branch. However it seems the url used to access the documentation is case sensitive. The correct

相关标签:
5条回答
  • 2020-12-01 19:03

    If you have a personal github page (username.github.io), you can create a folder inside this repository with your project name in lowercase, and inside that folder create an index.html redirecting to original url. As example: https://github.com/MiguelPynto/MiguelPynto.github.io/tree/master/shiftdisplay

    0 讨论(0)
  • 2020-12-01 19:03

    Having case-sensitive URLs is nice and all for computers. Search engines will be fine, they are, in the end, different ASCII characters. As per users, they will most of the times get confused and think the page doesn't work.

    One could either use a redirection URL for the GitHub page and never advertise the GitHub URL, or just indicate URL (case sensitive) everywhere.

    0 讨论(0)
  • 2020-12-01 19:13

    I am not sure this is directly related to GitHub.
    The w3c standards does mention:

    URLs in general are case-sensitive (with the exception of machine names).
    There may be URLs, or parts of URLs, where case doesn't matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive.

    In other words, you cannot be sure what OS is behind the web server you are accessing (a case-sensitive Linux one, or not a case-sensitive one with Windows, as described in the article "Are URLs Case Sensitive?").

    0 讨论(0)
  • 2020-12-01 19:15

    The url is case sensitive, but the domain is not. So

    http://harindaka.github.com/ASPTokenInput/

    differs from

    http://harindaka.github.com/asptokeninput/

    but

    http://HARINDAKA.github.com/ASPTokenInput/

    does not.

    Read the RFC; http://tools.ietf.org/html/rfc3986

    0 讨论(0)
  • 2020-12-01 19:17

    For your 4th question, I just tried to create a new repository on Github which would only differ by case to an existing one (of my own account), and I got a "Name is already taken" message. So, no, you can't have two repositories differing only by case.

    (It is possible to have directories and files inside the repository differing only by case, if your file system allows this, though.)

    0 讨论(0)
提交回复
热议问题