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

    I just published a news page on our company's website but had uploaded the wrong Open Graph image. I managed to modify it on FB, GC and twitter but not on LinkedIn. The image just wouldn't refresh. The solution that I found online won't do me any luck either. LinkedIn said on their docs that they only do refresh once a week and that's helluva long time and I really need to change that image badly.

    The only solution that I can think of right now is to create a new page, and then redirect the old url to the new url. Then it will have a new Open Graph Image that LinkedIn will need to read.

    But I don't know how to redirect a certain page to a certain page. Is that possible?

      • 3749
      • 24,544 Posts
      If you get the new page to work, you should be able to just paste its contents and TV values into the old one, no?

      If not, a rewrite rule in .htaccess would be the most efficient way to redirect users to the new page.

      Another way to go would to find and rewrite the links to the old page and make them links to the new page.

      Finally, you could put a snippet tag at the top of the old page for a snippet with this code:

      $newId = 12; // change this to the ID of the new page
      $url = $modx->makeUrl($newId, "", "", "full");
      $modx->sendRedirect($url);


      If you want the URL to remain the same, you can also use $modx->sendForward($url) instead of $modx->sendRedirect($url).
        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
        • 49300
        • 19 Posts
        Hi BobRay

        I pasted your code in a chunk and called it above the header of my page but it just displays the raw code. Do I need to put it in some kind of tag?

          • 36996
          • 211 Posts
          You need to create a new snippet, paste the above code in the snippet and use it on your page.
            • 49300
            • 19 Posts
            Thanks.

            I got it working on Redirector - http://rtfm.modx.com/extras/revo/redirector

            I hope there won't be any redirection error in the future though.