I asked a questions here:
I got an answer, here is what I am using:
RewriteRule ^index\.php - [L]
RewriteRule ^([^/]+)/([^/.]+)/?$ /new/index.php?d=$1&p=$2 [L]
Now, I need to be able to have the URL like this: http://company.com/new/variable/variable/?foo=a
when I try that the foo=a is never recognized. Is there a simple way to make the URL query come into the rewrite rule.