How to remove variables from rewrited url and keep removed url variables
<p>My index page;</p>

<pre><code>&lt;form id="myfom" action="x.php" method="get"&gt;
&lt;fieldset&gt;

&lt;select name="a1" id="a1"&gt;
&lt;option value="o1"&gt;o1&lt;/option&gt;
&lt;option value="o2"&gt;o2&lt;/option&gt;
&lt;/select&gt;

&lt;select name="a2" id="a2"&gt;
&lt;option value="oo1"&gt;oo1&lt;/option&gt;
&lt;option value="oo2"&gt;oo2&lt;/option&gt;
&lt;/select&gt;

&lt;select name="a3" id="a3"&gt;
&lt;option value="ooo1"&gt;ooo1&lt;/option&gt;
&lt;option value="ooo2"&gt;ooo2&lt;/option&gt;
&lt;/select&gt;

&lt;select name="a4" id="a4"&gt;
&lt;option value="oooo1"&gt;oooo1&lt;/option&gt;
&lt;option value="oooo2"&gt;oooo2&lt;/option&gt;
&lt;/select&gt;

&lt;select name="a5" id="a5"&gt;
&lt;option value="ooooo1"&gt;ooooo1&lt;/option&gt;
&lt;option value="ooooo2"&gt;ooooo2&lt;/option&gt;
&lt;/select&gt;

&lt;select name="a6" id="a6"&gt;
&lt;option value="oooooo1"&gt;oooooo1&lt;/option&gt;
&lt;option value="oooooo2"&gt;oooooo2&lt;/option&gt;
&lt;/select&gt;


&lt;script type="text/javascript"&gt;
function murl() {
    var grp1 = document.getElementById('a1').options[document.getElementById('a1').selectedIndex].value;
    var grp2 = document.getElementById('a2').options[document.getElementById('a2').selectedIndex].value;
    var grp3 = document.getElementById('a3').options[document.getElementById('a3').selectedIndex].value;
    var grp4 = document.getElementById('a4').options[document.getElementById('a4').selectedIndex].value;
    var grp5 = document.getElementById('a5').options[document.getElementById('a5').selectedIndex].value;
    var grp6 = document.getElementById('a6').options[document.getElementById('a6').selectedIndex].value ;
    var url = "http://www.domain.com/"+grp1+"-"+grp2+"-"+grp3+"-"+grp4+"-"+grp5+"-"+grp6+".html";

    document.forms["myform"].submit();
    window.location.href=url;
}
&lt;/script&gt;
&lt;input type="button" onclick="murl()" /&gt;
&lt;/fieldset&gt;
&lt;/form&gt;
</code></pre>

<p>htaccess file is;</p>

<pre><code>Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ x.php?a1=$1&amp;a2=$2&amp;a3=$3&amp;a4=$4&amp;a5=$5&amp;a6=$6 [L,QSA]
</code></pre>

<p>Site is working like this;
<a href="http://www.domain.com/a1-a2-a3-a4-a5-a6.html" rel="nofollow">http://www.domain.com/a1-a2-a3-a4-a5-a6.html</a></p>

<p>And here is my question;
I want the url like <a href="http://www.domain.com/a1-a2-a3.html" rel="nofollow">http://www.domain.com/a1-a2-a3.html</a></p>

<p>But i also want to get the variables which are a4,a5,a6 on new page (after submitting form to x.php)</p>

<p>Tried many things like RewriteCond %{QUERY_STRING}, 

<p>Any help will be greatful..</p>

<p>Regards</p>
