We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21560
    • 145 Posts
    I’m using Friendly URLs and it’s working fine. However, I do NOT want to have ".html" behind every URL. It’s so 2001.

    Now, I have tried to rename the extension of the HTML doc-type to "" (nothing)

    Is there any way to achieve this? In Evolution you could just leave the Friendly URL Suffix empty.
      [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Content types are specific filesystem types for your resources. Here you can manage them; as well as associate them with file extensions. Need to change an extension? Just double click on the extension field and change to your preferred setup.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 21560
        • 145 Posts
        As visible in my first post. This is exactly what I’ve tried.

        Now, site-caching is possibly an issue here. But can anyone confirm that changing the HTML mime-type extension to "" (an empty string), that it removes .html on friendly urls?
          [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
          • 22019
          • 390 Posts
          Yes, but if you change the content-type extension after you have created resources - by removing the existing Content Type and then creating a new one with the desired extension - then the already loaded content will need to have their content-type reset (either manually, or in PHPMyAdmin - or if you were feeling particularly adventurous, you could extend the Batcher package to do this).

          Or, update your new content type in the table modx_content_types to be the id of whatever you’ve replaced (HTML being 1).
            Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
            • 22303 MODX Staff
            • 10,725 Posts
            And make sure you clear your site cache after making the change, or you will not see it. Editing the Content Types does not trigger a cache clear.
              • 21560
              • 145 Posts
              I noticed that. It works fine just setting the HTML type to an empty extension and clearing the site cache...

              Grrrr... At least for building I’ve disabled the cache for now. Must say, Revolution is a bit of a steep curve in some areas, but it is, in the end, all much better.
                [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com