PDA

View Full Version : mod_rewrite troubles



moonshield
05-16-2006, 09:25 AM
howdy,

I have the following in my htaccess.



RewriteRule ^facts/(.*)/$ /facts.php?mode=browse&node1=$1
RewriteRule ^facts/(.*)/(.*)/$ /facts.php?mode=browse&node1=$1&node2=$2
RewriteRule ^facts/(.*)/(.*)/(.*)/$ /facts.php?mode=browse&node1=$1&node2=$2&node3=$3


I'm trying to make this work but it only processes the first directive. Is there a way to combine these while making it work?

I Appreciate it.

KelliShaver
05-16-2006, 09:49 AM
Just reverse 'em.



RewriteRule ^facts/(.*)/(.*)/(.*)/$ /facts.php?mode=browse&node1=$1&node2=$2&node3=$3
RewriteRule ^facts/(.*)/(.*)/$ /facts.php?mode=browse&node1=$1&node2=$2
RewriteRule ^facts/(.*)/$ /facts.php?mode=browse&node1=$1

moonshield
05-16-2006, 09:51 AM
lol. That's awesome.

Thanks.