I have a 2nd store which I'm closing and consolidating to my existing store. Instead of simply redirecting old links to a base directory I'd like to leave the customer looking at a search page result that best fits what they were trying to see on the store I'm closing.
For example, my current "old" store hosted on a separate subdomain looks like this:
http://subdomain.example.com/store/url-key
However I'm trying to use htaccess to redirect to my main domain (www) and convert the "url-key" to use "+" instead of "-" so that we can use it as the "q" like the following:
http://www.example.com/store/catalogsearch/result/?q=url+key
For now I'm redirecting all of my traffic to the base domain which I think is bad for SEO and user experience.
RewriteCond %{HTTP_HOST} ^subdomain\.example\.com$
RewriteRule (.*) http://www.example.com/store/ [R=301,L]
I've tried all different combinations of htaccess redirects however I'm struggling to make it work correctly.