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.
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
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
I think customurls will over the solution tough i cant really figure it out.
-
☆ 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
Opengeek, yes that gave the awnser!