I have a problem with htaccess rewrite_mode. when i use multiple $_GET variables in these rules, first variable get the name file that be first $_GET variable. please help me.
RewriteEngine on
RewriteBase /ts/
RewriteRule ^(.+)/$ ts.php?a=$1 [C]
RewriteRule ^(.*)/(.+)/$ ts.php?a=$1&b=$2 [C]
RewriteRule ^(.*)/(.*)/(.+)/$ ts.php?a=$1&b=$2&c=$3 [C]
RewriteRule ^(.*)/(.*)/(.*)/(.+)/$ ts.php?a=$1&b=$2&c=$3&d=$4 [C,L]
this is output for "localhost/ts/1/"
Array ( [a] => 1 )
this is output for "localhost/ts/1/2/"
Array ( [a] => ts.php [b] => 2 )
this is output for "localhost/ts/1/2/3/"
Array ( [a] => ts.php [b] => 2 [c] => 3 )
this is output for "localhost/ts/1/2/3/4/5/6/"
Array ( [a] => ts.php/2/3 [b] => 4 [c] => 5 [d] => 6 )