How can I convert an url as below :
http://localhost/series/dynamics/admin/cleanURL/value1?subgroup=value2
to a cleaner URL,
for e.g: http://localhost/series/dynamics/admin/cleanURL/value1/value2
I am using $_GET and have the option of using $_SERVER['REQUEST_URI']. The name of the php file is index.php. I have managed to achieve clean url for the first parameter i.e. value1 but clueless on how to do so for value2
My htaccess looks like this, pretty sure it needs to pass a second parameter but not able to work out how.
Rewriteengine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Rewriterule ^([a-zA-Z]+)$ index.php?group=$1
I have tried: ^([a-zA-Z]+)$ index.php?group=$1?subgroup=$2
and few other methods but none of them are working
Please have a look at 2 PHP codes below, I am not sure if "&" will do the job as anything apart from "?" take me to a different page.
<li id="nav"<?php if($pageid==$nav['group']){echo'class="active"';}?>><a href="<?php echo $nav['group'];?>"><?php echo $nav['product']?></a></li>
<a href="?subgroup=<?php echo $list['subgroup']; ?>" <?php if($tst1 == $list['subgroup']){echo 'class="active"';} ?> ><?php echo $list['subgroup']."(".$list['contains'].")".'<br/>';?></a>
Can I use "&" instead of "?" in the link for subgroup ?