We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46459
    • 7 Posts
    Hello All,

    So currently we use flat PHP/HTML for our sites. I have modx set-up and ready to work with multi sites. I am trying to figure out what would be the best way to recreate the URLS, so we don't have to change all our ads, and our affiliates don't need to change their URLs.

    Here's our current URL structure:
    mydomain.com/specials/99/current_offer

    It translates to:
    domainname.com/section/funnel_id/landing_page

    With modx, I can have:
    mydomain.com/specials/current_offer

    which translate to:
    domainname.com/container/document

    The funnel_id part can be dynamic as it's for tracking purposes, often we set a default id if users do not have one.

    Thanks in advance.
      • 3749
      • 24,544 Posts
      You can have this exact URL in MODX:

      mydomain.com/specials/99/current_offer

      Just create a page with the alias 'specials', put a page with the alias '99' below is and page with the alias 'current_offer below that.

      All will have to be published, but you can hide any of them from menus.

      If it's a Weblink or Symlink, you can forward the user to any other page, but I'd be inclined instead to just put the current offer on that page using a snippet that selects a chunk with the content (possibly based on the value of a Template Variable on the specials page).
        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
        • 46459
        • 7 Posts
        @BobRay

        I order your book, just received it. I haven't read it, just a quick glance at the content. Pleased with my purchase. I'm looking forward to learning lots from it.

        Bob,

        On mydomain.com/specials/99/current_offer the /99/ is dynamic and for tracking purposes; due to the amount spent on ads by affiliates makes it tough to move it from that position.

        I think the solution is a line or two in the .htaccess file.


          • 3749
          • 24,544 Posts
          Thanks for buying my book. smiley

          I haven't used this extra, but it might do what you want: https://docs.modx.com/extras/revo/customurls
            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
            • 13428 ☆ A M B ☆
            • 1,031 Posts
            You need a custom routing extra like CustomRequest. A regex configuration of that extra could help to achieve the result.
              • 46459
              • 7 Posts
              Bob and Jako, thank for the suggestions. Let me look at them. Thanks.