We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36551
    • 416 Posts
    Anyone else with this problem? I've got several sites to fix. Not sure how to zero in on the problem.
      • 45778
      • 75 Posts
      I'm the one who originally posted the question, and I still haven't found a solution, but I haven't been actively investigating it much lately either. On my site, the Friendly URLs work great, but the index.php?id=x string no longer converts to the friendly URL in the address bar. The page shows up just fine, but the URL isn't what I want it to be. At one point it used to forward correctly. I'm not sure if an upgrade to MODX is the culprit, or if there's something else going on.
        • 3749
        • 24,544 Posts
        I agree that it's duplicate content, but how would a search engine ever visit the ID-based URL? I can't imagine a real-world situation where this would result in a penalty, but maybe I'm missing something.
          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
          Bob

          I'm not sure either how it would be found. I suppose it's possible it was indexed before the site went live with friendly URLs.

          I agree a real world penalty may be minimal, but SEO folks, hired by our clients want these things fixed so they get good grades from their clients and reports from the tools they use. So clients care about this "technicality". I know my client wants it corrected because their shouldn't be ANY duplicate content.

          Plus it seems to me that something is not working correctly somewhere be it Modx, .htaccess or some server settings.

          My two cents. . .
            • 3749
            • 24,544 Posts
            That makes sense, but I wonder where the testing software is getting those ID-based URLs. Have you checked your site map (if there is one)?

            Have you deleted all the core/cache files since upgrading to 2.5.1?

            As a workaround, it might be possible to add a plugin connected to OnHandleRequest that would forward to the friendly URL version with a 302, moved permanently response.
              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 xml site map has no index.php?in=x URLs.

              Yes I've cleared the cache.

              I might try the redirect for some but for some of my sites that may not be workable. because there are two many pages and I suspect it would be a future maintenance issue if pages get new names/url alias.
                • 3749
                • 24,544 Posts
                Good point. I wish I could think of something that would cause that.
                  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
                  This problem has resurfaced on another site. I never did resolve this on my other sites.

                  But again index.php?id=xx displays the page correctly but does not rewrite the URL. The friendly URL for this page also displays the page correctly with the friendly URL. So each page can be seen with both URLs. This is happening across the site.

                  This is the .htaccess (I removed the comments & domain). The rewrite is working for any Modx generated links such as navigation and tags e.g. [[~12]], but it's not converting the index URLs if they're manually entered or if clicked on from a link with the index URL.
                  AddHandler application/x-httpd-phpbetas .php
                  AddHandler application/x-httpd-php56 .php
                  RewriteEngine On
                  RewriteBase /
                  RewriteCond %{HTTP_HOST} !^domain-removed\.com [NC]
                  RewriteRule (.*) http://domain-removed/$1 [R=301,L]
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

                  Modx 2.5.7

                  Anyone else figure this out yet?
                    • 17301
                    • 932 Posts
                    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.
                      ■ 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.
                      • 17301
                      • 932 Posts
                      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.
                        ■ 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.