Hello!
I'm trying to make the following scenario in Modx Revo - by clicking on the link www.mysite.com/adrs/aaa/bbb to go to www.mysite.com/test.php?c=adrs&street=aaa&house=bbb, where street is the name of the street, house is the house number. And for the user the final page of the transition should be hidden and remain as viewable the original one in the form of www.mysite.com/adrs/aaa/bbb
The resulting page contains a snippet that outputs certain information for the given address, for example, all the transmitted parameters by means of "print_r ($_GET);".
Now the added part of the .htaccess file looks like this:
RewriteCond% {REQUEST_FILENAME}! -f
RewriteCond% {REQUEST_FILENAME}! -d
RewriteRule ^adrs /(.*)/(.*)/?$ test.php?c=adrs&street=$1&house=$2 [L]
#The Friendly URLs part
RewriteCond% {REQUEST_FILENAME}! -f
RewriteCond% {REQUEST_FILENAME}! -d
RewriteRule ^(.*)$ Index.php?q=$1 [L, QSA]
The script works, but it shoes www.mysite.com/test.php?c=adrs&street=aaa&house=bbb
Please, advise how to improve this scenario, especially to edit RewriteRule in .htaccess.
P.S. Perhaps my task is easier to implement in some other way, for example, by creating an ‘adrs’ component, using namespaces, by creating plugin with some event or by registering something in connectors, core, or something else?