Currently I use .htaccess rewrite to pass a variable to my page, like this:
RewriteRule ^file/(.*)$ incl/files/file.php?id=$1 [NC,L]
So when someone enters:
mydomain.com/file/abcde
they actually get a file from
mydomain.com/incl/files/file.php?id=abcde
I need to modify this rule in .htaccess to be able to pass additional variable SOMETIMES. Most of the time the rewrite will have just one var, like in example above and sometimes it may have two:
mydomain.com/incl/files/file.php?id=abcde&action=send
I think there's away to pass second var but I am not sure how to do it dynamically, sometimes include and sometimes not while keeping the rewrite working properly.
I've tried something like this but when I pass two vars like this my page does not work properly...
RewriteRule ^file/(.*)$ incl/files/file.php?id=$1 [NC,L]
RewriteRule ^file/(.*)-(.*)$ incl/files/file.php?id=$1&action=$2 [NC,L]
Really stuck on this....