I have a javascript app with MODX as the "site shell" wrapped around it. It is a beautiful thing. FURLs are enabled and they are working well.
So let's say I have "cars" setup as a resource (with "cars" as the alias).
If I go to www.mydomain.com/cars, my JS app renders a listing of ALL cars in a grid.
If I go to www.mydomain.com/cars?make=acura, that also works - my app grabs the parameter and renders a filtered list of all Acuras.
Now, what I am trying to achieve is, a visitor goes to www.mydomain.com/acura, and she would be taken to that same filtered Acuras page.
I have tried two approaches, neither working.
Approach 1 - $modx->sendForward:
As Jason Coward / opengeek has advocated on several occasions (
http://forums.modx.com/thread/2833/customized-url#dis-post-17596 and
http://forums.modx.com/thread/35476/can-snippets-plugins-make-use-of-intercept-friendly-urls#dis-post-194484 for instance), this is a good way to map dynamic friendly URLs tied to a single resource, by binding a plugin to the OnPageNotFound event. And it does work - but it seems only MODX can see the parameter that is passed - my non-MODX app is not seeing it.
<?php
//simple hard-coded test just to prove the concept. "cars" Resource ID = 11
//the parameter gets passed such that MODX can see it at the destination resource, but my JS/PHP app is not seeing it
$_GET['make'] = acura;
$modx->sendForward(11);
?>
Approach 2 - htaccess:
I saw
http://forums.modx.com/index.php?topic=60038.0, and can't get that working either.
I feel the following should work, but there is some conflict with how MODX does FURLs?
#again, simple hard-coded test to prove the concept
#the following actually does get to the cars page successfully, but does not pass the make parameter!
RewriteRule ^acura$ cars?make=acura [L,QSA]
# The Friendly URLs part (MODX standard)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Totally stumped. Would love to hear from Jason or others with input on how to solve this.
Thanks