We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Setting the request_method_strict system setting to yes should do the trick, though I'm not sure if that will actually redirect, or just ignore incorrect requests.

    There's also friendly_urls_strict which might also work, but that can cause issues when you have custom urls, so test carefully after changing that.
      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
      • 36551
      • 416 Posts
      Quote from: lkfranklin at Jul 14, 2017, 03:21 PM
      I don't think it's a problem to be figured out to be honest. URLS can be accessed by both either with a query on the index or a friendly URL. If your hard coded links aren't converting, which they wouldn't, you would just need to Hardcover in the friendly URL.

      Actually on most of my other sites, these index URLs do convert to the friendly URLs including any hardcoded links.

      So something is different on these few.
        • 36551
        • 416 Posts
        Quote from: lkfranklin at Jul 14, 2017, 03:23 PM
        Also just to point out if your SEO guys are picking up the id links and it's not present in the site map that's probably because their SEO tool is picking it up from the anchor links that are hard coded in the page, not the xml site map.

        Yeah, no idea where they SEO guys would find these, but when they do, they're like a dog with bone. Of course, the client get's all concerned about such things when theyre told it needs to be fixed, which comes back to me. smiley
          • 36551
          • 416 Posts
          Quote from: markh at Jul 14, 2017, 03:31 PM
          Setting the request_method_strict system setting to yes should do the trick, though I'm not sure if that will actually redirect, or just ignore incorrect requests.

          There's also friendly_urls_strict which might also work, but that can cause issues when you have custom urls, so test carefully after changing that.

          OK, tried both of those.

          Changing the request_method_strict to yes caused the index URLs to redirect to the home page, not the 404.

          Changing the friendly_urls_strict had no affect on the index URLs.

          Curiouser and curiouser
            • 3749
            • 24,544 Posts
            This is happening to me now with 2.5.7. I also converted the whole site to https using LetsEncrypt, so I'm not sure if it was the MODX upgrade, the SSL conversion, or something else.

            There is still the question of where the SEO people are finding the index.php links. There should be no such links on the site.

            Fire up PhpMyAdmin, select the database, and on the SQL tab, try these three queries:

            SELECT * FROM `modx_site_content` WHERE content LIKE "%index.php?id=%"
            
            SELECT * FROM `modx_site_htmlsnippets` WHERE snippet LIKE "%index.php?id=%"
            
            SELECT * FROM `modx_site_templates` WHERE content LIKE "%index.php?id=%"


            The spacing in the LIKE clause in the queries above is most common, but if you have any SEO reports that give the index.php URL, duplicate their spacing in the LIKE clause.

            If you find any, you can correct them to proper link tags like the one below <a href="[[~12]]"> right there by editing the content or snippet field and clicking on "Go".

            <a href="[[~12]]">


            or

            <a href="[[~12? &scheme=`full`]]">
            



              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 36551
              • 416 Posts
              The only way I can think of the SEO reports finding these is if the site was indexed before friendly URLs were turned on.

              Also, even if every link is properly coded as a tag [[~12]], the index URLs should still convert to friendly URLs if they'are entered, right? I don't understand why this would happen on some sites and not others.
                • 17301
                • 932 Posts
                Quote from: terrybarth at Jul 15, 2017, 03:08 PM
                The only way I can think of the SEO reports finding these is if the site was indexed before friendly URLs were turned on.

                Like I said in my previous post a lot of tools like, like SEM Rush, will scan the entire site for all links and not just go on your sitemap. If a link has been hardcoded as an index.php?id=X then it'll pick that up a long with its respective counterpart.

                I've just tried on 5 different sites and all of them work and display the query string if entered. However, I did try on a site also that I know is running an older version of MODX and that one does convert the query string to the friendly url. So I'm guessing its a potential issue with the latest version?
                  ■ email: [email protected] | ■ website: https://alienbuild.uk

                  The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
                  • 3749
                  • 24,544 Posts
                  Quote from: terrybarth at Jul 15, 2017, 03:08 PM
                  The only way I can think of the SEO reports finding these is if the site was indexed before friendly URLs were turned on.

                  Also, even if every link is properly coded as a tag [[~12]], the index URLs should still convert to friendly URLs if they'are entered, right? I don't understand why this would happen on some sites and not others.

                  Did you try the queries I posted above?
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 36551
                    • 416 Posts
                    Quote from: BobRay at Jul 15, 2017, 08:41 PM
                    Quote from: terrybarth at Jul 15, 2017, 03:08 PM
                    The only way I can think of the SEO reports finding these is if the site was indexed before friendly URLs were turned on.

                    Also, even if every link is properly coded as a tag [[~12]], the index URLs should still convert to friendly URLs if they'are entered, right? I don't understand why this would happen on some sites and not others.

                    Did you try the queries I posted above?

                    I will, haven't had a chance yet.
                      • 36551
                      • 416 Posts
                      I searched my DB. There are no remaining index URLS in the site. So this is simply a case where the index URLs are not rewriting if entered into a browser.