We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22969
    • 158 Posts
    Hi ppl,

    Can someone explain to me in simple terms how I can take of the ".html" extension on my pages, I cant find it under Friendly URL’s settings, also now when I access domain.com/manager/ it takes me to the website homepage, olny when I type in index.php after it takes me to the login pages.

    Thanks guys for any help you can give!

    Brett
      • 22969
      • 158 Posts
      Anyone have any thoughts??

      Thanks
        • 7557
        • 61 Posts
        Hi
        Look in System -> Content Types and remove file extension for HTML
          • 22969
          • 158 Posts
          Ouch!

          My site is bro0ken now


          Fatal error: Call to a member function getExtension() on a non-object in D:\Domains\domain.co.uk\wwwroot\core\model\modx\modcachemanager.class.php on line 150??

          Thats all it comes up with now??

          Please help!
            • 16942
            • 33 Posts
            Quote from: dj13 at Nov 03, 2010, 08:04 PM

            Hi
            Look in System -> Content Types and remove file extension for HTML


            When you did the above, you didn’t actually remove the whole entry did you? You just clear the file extension field.

            Friendly URLs is terribly badly implemented as you’ll see from some other posts of mine so I feel your pain!
              • 22969
              • 158 Posts
              Yes I did!

              How do I fix this?

              Thanks
                • 22969
                • 158 Posts
                I recreated the content type HTML but it has an ID 7 were the original had ID 1

                How do i fix this the site is totally broken, im surprised its that easy to break?

                Im stuck!
                  • 22019
                  • 390 Posts
                  *caveat - I haven’t tested the below, as I don’t have time to break my dev site*
                  If you’ve removed the HTML content type, then I’m not sure simply replacing a new Content Type key of HTML is going to help - as the content type key (1, in this case) is hard-wired into the site_content table. If you add another Content Type in System > Content Types it will presumably auto-increment the key.

                  You’ve got two MySQL options - (i) Create a new content type key, check what ID it has, and then update all site_content resources with id of 1 to this new number, or (ii) Create a new key, and brute force the ID back to 1 (it may not allow you to do this).

                  As for your initial question, I take it you wanted:

                  http://www.foo.bar/friendly.html
                  to become:
                  http://www.foo.bar/friendly

                  Depending on how big your site is, you can do this by checking the container box on a resource, and changing the container suffix to blank in Friendly URLs. Or as the original respondent suggested, by making the HTML content type have a ’blank’ suffix.


                    Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
                    • 22969
                    • 158 Posts
                    I actually before seeing your post just changed the ID of the HTML content type from 7 to 1 in the database it seems to have fixed it!

                    Thanks, panic over!
                      • 22969
                      • 158 Posts
                      I have changed .html to / but the pages on the front end still have .html extension?

                      Also I still have that problem that when you access www.domain.com/manager it just shows the homepage, I have to type in index.php after which is a little frustrating, how do i make it work on just /manager?

                      Thanks