Let’s see if we can get this clear. You have a database outside the modx db which contains the content for your movie pages (and perhaps the pagetitle etcetera). You can show all these pages via one modx document by using a snippet which fetches the data form the approriate table(s). If you haven’t done this yet there’ some info in the wiki on
how to access another database from MODx
The frienldly url scheme you originally intended can be achieved by an extra rewrite rule. Your .htaccess should look something like this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#some rewrite magic to split filter and movie
RewriteRule ^movies/([a-z]{0,1})[/]*([0-9]*)$ movies.html?filter=$1&movie=$2 [QSA,PT]
#followed by usual modx furl rule
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Here’s what will happen for different urls:
http://your.domain.com/movies.html
$_REQUEST = array (
'q' => 'movies.html',
)
http://your.domain.com/movies/c
$_REQUEST = array (
'q' => 'movies.html',
'filter' => 'c',
'movie' => '',
)
http://your.domain.com/movies/23
$_REQUEST = array (
'q' => 'movies.html',
'filter' => '',
'movie' => '23',
)
http://your.domain.com/movies/f/23
$_REQUEST = array (
'q' => 'movies.html',
'filter' => 'f',
'movie' => '23',
)
Now all you have to do is (re)write your snippet to use the $_REQUEST[’filter’] and $_REQUEST[’movie’] variables and off you go....
There are some drawbacks.. You can’t rely on MODx methods (or it’s various existing snippets) to generate these particular friendly urls for instance. You’ll have to code that yourself.