hello, I am using RewriteRule (.*)/index-(.*)\.htm$ search.php?q=$1&s=$2 [L] PHP: and output is: http://www.site.com/xxxxx/index-1.htm what can i do to get the output like http://www.site.com/xxxxx/xxxxx-1.htm thanks for your help.
Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteRule ^([^.]+)/([^.]+)\-([^.]+)\.html$ search.php?q=$1&s=$3 [L] if index isn't in the search.php?q= URL the script will have to add something there. If every URL has index- RewriteRule ^([^.]+)/index\-([^.]+)\.html$ search.php?q=$1&s=$2 [L]