I use virtual domains, so "domain.com" in the example below is something that will change, e.g., I .htacess file for many domains. My old structure is http://domain.com/product/this-is-my-search Code (markup): and I want to redirect that to http://domain.com/go.php?q=this is my search Code (markup): notice the dashes have been removed from the search query. How can I do this? THANKS!
I think I found a solution. Of importance here are these three lines of code: RewriteRule ^products/(.*)$ http://%{HTTP_HOST}//go.php?q=$1 [L] RewriteRule ^search/(.*)$ http://%{HTTP_HOST}//go.php?q=$1 [L] RewriteRule ^product/0/(.*)$ http://%{HTTP_HOST}/go.php?q=$1 [L] Code (markup): Essentially, if the search engines have indexed your site with the construction of URLs as such, this will do a redirect the product name or phrase to go.php as a query. Now, this is experimental (as is most I do in the beginning), and I'd love to hear your feedback! Example If your domain is indexed as thus in Google: http://blogmasher.com/products/captain-america-super-soldier-xbox-360 Code (markup): You will be redirected to: http://blogmasher.com/go.php?q=captain-america-super-soldier-xbox-360;&sort=0;&numitem=10;&page=1 Code (markup):