i am trying to rewrite URL using htaccess. i need
1> temp.example.com/save.php?item=xxxxx&id=xxx&type=1
2> temp.example.com/save.php?item=xxxxx&id=xxx&type=2
to be like
1> temp.example.com/save/xxxxx/xxx
2> temp.example.com/save/xxxxx/xxx
have to hide last parameter .
my htaccess has
RewriteCond %{THE_REQUEST} \s/save\.php\?item=([_0-9a-zA-Z-]+)\s&id=([_0-9a- zA-Z-]+)\s&type=([_0-9a-zA-Z-]+)\s [NC]
RewriteRule ^temp/save/%1/%2/%3? [R=301,L]
RewriteRule ^temp/save/([_0-9a-zA-Z-]+)$/([_0-9a-zA-Z-]+)$/([_0-9a-zA-Z-]+)$ /save.php?item=$1&id=$2&type=$3 [L]
Thanks
typeparameter's value intemp.example.com/save/example/2? Do you always wanttype=1to be statically added tosave.php?typenow since it is not static anymore as it has value1and2that you will need insave.php