I'm trying to display my get variables as flat links. Want to change from this:
http://mydomain.com/index.php?page=shop&var1=hat&var2=10
to
http://mydomain.com/index.php/shop/hat/10
Please keep in mind that there isn't a fixed number of variables, that's why I use var1,var2,...etc
[edit] I already have a partially working script, but works only with max 3 variables
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]
RewriteRule ^([^/\.]+)/?$ index.php?page=$1 [L]
RewriteRule ^([^/\.]+)/?([^/\.]+)/?$ index.php?page=$1&var=$2 [L]
RewriteRule ^([^/\.]+)/?([^/\.]+)/?([^/\.]+)/?$ index.php?page=$1&var=$2&var2=$3 [L]
RewriteRule ^([^/\.]+)/?([^/\.]+)/?([^/\.]+)/?$ index.php?page=$1&var=$2&var2=$3&var3=$4 [L]