I did a mod rewrite code. I do not know if it is the right way to do. it works perfect but can somebody check if it is done properly? RewriteRule (.*)/index-(.*)\.htm$ search.php?q=$1&s=$2 [QSA,L] RewriteRule (.*)/index(.*)\.htm$ search.php?q=$1 [QSA,L] Code (markup): output is search.php?q=xxxxx xxxxx/index.htm search.php?q=xxxxx&s=40 xxxxx/index-40.htm Code (markup): Thanks