I am using mod rewrite in an .htaccess file to change the URL to a nicer one, it converts this:
http://domain.com?a=test&v=page&id=3
to
http://domain.com/test/page/3
using this condition
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)?$ index.php?a=$1&v=$2&id=$3 [L]
I want to do something different if $1 == cart and $2 == home
Here is some pseudo code for the idea using a php if condition
if($1 == 'cart' && $2 == 'home'){
here I want to do a different rewrite rule
}else{
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)?$ index.php?a=$1&v=$2&id=$3 [L]
}
Any idea as to how I go about that?
2 rewrite rules, with the predefined one first: