Hi guys, Here is my current url: ?p=new-homes-by-place&id=416&name=east-homes Here is how I want to have my url: ?p=new-homes-by-east-homes&id=416 So far, I have generated this way using .htaccess: Code: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^p=new-homes-by-([^/]+)&id=([0-9]+)?$ ?p=new-homes-by-place&id=$2&name=$1 [L]This actually works somehow. However, I miss the question mark on front of the new url (?p=new...). I know that this has to do with query string, but I dont know how to implement so I can keep the question mark on front. A help on this will be highly appreciated.
Try using the following rules: RewriteCond %{QUERY_STRING} ^(.*)\&name=east-homes RewriteRule .* http://domain.com/?$1%1%2 [R=301,L] Code (markup): or, something like this: RewriteCond %{QUERY_STRING} \&name=east-homes RewriteRule .* http://domain.com/? [R=301,L] Code (markup):