We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41127
    • 23 Posts
    What i am trying to achieve is the following.

    I want to have a custom check / index.php that firstly checks if the path is generated by myself, to documents / pages, that do not directly exist in my database, if so, redirect to a defined path that does exist in my databse and which is a document and the use that document to render more content...

    I have a snippet which makes a soap call, get's the data and auto generates paths, for example soapObjectCategorie/soapObjectItem/soapObjectId/soapObjectName. So i want all my redirects to firstly go trough a custom script, this script will check if the first part of the path is a categorie that we use in oure other database. If so redirect the user to a document, this document will handle the rest with displaying etc. If this is not a categorie we use, just do the standard modx page handling and get the requested document.

    How would you set this up or suggest i set this up. I do not want to cache the soap object in oure datbase so that one is of the table.
      • 41127
      • 23 Posts
      And here is what im thinking. Change the htaccess to redirect everything to a own script, then do the checks and then just redirect to index.php?q=$1
        • 41127
        • 23 Posts
        Thats not going to work, im looking at redirector and that does somewhat do what i need only i need to programmatically check for patterns in stead of manually creating patterns
          • 41127
          • 23 Posts
          I think customurls will over the solution tough i cant really figure it out.
            • 10208 ☆ A M B ☆
            • 1,780 Posts
            I ran a search for "redirect" and this thread popped up but I don't know if it will be helpful or not. Searching yourself may be a good option, you may find something helpful.

            https://forums.modx.com/thread/36735/snippet-resovled-how-do-you-redirect

              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster
              • 22303 MODX Staff
              • 10,725 Posts
              This is generally handled via a plugin, OnPageNotFound, which is then responsible for any custom routing to Resources via the $modx->sendForward() method. See this post for more information.
                • 41127
                • 23 Posts
                Opengeek, yes that gave the awnser!