We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37550 ☆ A M B ☆
    • 711 Posts
    onesmarthost Reply #1, 20 years ago
    Hi All,

    I’m using FURLS with ISAPI Rewrite and have noticied that the urls are case sensitive

    for example

    http://www.shosting.co.uk/tutorials.html <- gives me 404 page but
    http://www.shosting.co.uk/Tutorials.html <- works

    I did think this was to do with isapi rewrite so tried I turned off FURLS and used a prefix ie. q= but this brings me to the 404 page.

    Ideally I would like modx to accept a page name in any case.

    Any tips would be much appreciated.

    Thanks
    Aaron
      http://www.onesmarthost.co.uk
      UK MODX Hosting with love.
      • 21255
      • 215 Posts
      In fact URLs are case-sensitive. See RFC 2616 Sec. 3.2.3 and RFC 3986 Sec. 6.2.2.1. wink
        • 37550 ☆ A M B ☆
        • 711 Posts
        onesmarthost Reply #3, 20 years ago
        Any ideas how i turn it off?

        I dont fancy having to explain to customers on the phone the correct case for a url i was giving them over the phone.

        Thanks
          http://www.onesmarthost.co.uk
          UK MODX Hosting with love.
          • 24414
          • 45 Posts
          Is there any specific reason that you are using caps?
          Even if you are using static HTML this will cause problems in many servers as filenames are supoosed to be case sensitive as noted above in netnoise’s post.

          Your best bet would be to remove the caps in your document aliases...
            • 13577
            • 302 Posts
            awardle is 150% right.

            Often - for marketing/readabiliy’s sake, it is handy to have camelcaps or something in a url (e.g. www.example.com/easierToReadThanAllLowerCase). But is a user going to type it that way? Generally no. And in any case, it should be assumed that users will type URLs unpredictably. No matter what the RFC says! laugh

            Shoot, back in the Etomite days I initiated a hack to eliminate case sensitivity... wonder what happened to that? Yes there’s a fix. No it’s not hard... but it might take me a few minutes to track it down.

            This would be a nifty config option under FURLs...
              Standard Disclaimer
              I could be totally wrong.
              • 22303 MODX Staff
              • 10,725 Posts
              Just add the NC option to the rewrite rule and it will treat them all as lowercase.
                • 25663 MODX Staff
                • 12,272 Posts
                Except if you’re on IIS. Which awardle is I believe.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 13577
                  • 302 Posts
                  Maybe I’ll add it to the feature request at Flyspray and assign it to myself laugh

                  Feature request added #575
                    Standard Disclaimer
                    I could be totally wrong.
                    • 21255
                    • 215 Posts
                    That ’feature’ would be a totally wrong way of handling URLs and so should be called a bug. grin

                    EDIT: You could do it by redirecting the CamelCaseUrl to a camecaseurl, but please don’t simply strtolower url-paths.
                      • 13577
                      • 302 Posts
                      I’m not sure I follow.

                      Certainly I wouldn’t cut and paste from 17 month old Etomite code. But isn’t the gist of the thing to get the correct doc id? That was the simple idea back then and all that the Eto code did. It just used strtolower to level the playing field for comparison’s sake. No file names or aliases were actually changed and the overhead of a redirect wasn’t incurred. The URL as it appears in the browser isn’t affected.

                      Of course, this isn’t going to be my new life’s purpose anytime soon... I don’t even have mod_rewrite on my test server yet! embarrassed

                      In my mind, this is more a query string question than a URL question, since the URL gets rewritten (internally) as index.php?q=SomeAlias. And isn’t it up to the app developer to decide how to deal with query string variables? I honestly don’t want this to come across as snide. I’m trying to learn this stuff but reading through piles of RFCs is, to me, akin to watching snail races.
                        Standard Disclaimer
                        I could be totally wrong.