1

I am trying to redirect the following URL

http://www.mydomain.com/catalogsearch/result/index/?brand=1076&mode=grid&product_category=5533&q=pro+restore    

To this URL:

http://www.mydomain.com/nsearch/?q=pro+restore

This is the code I've used for other urls in htaccess:

RewriteCond %{REQUEST_URI} ^/catalogsearch/result/index/$
RewriteCond %{QUERY_STRING} ^brand=1076&mode=grid&product_category=5533&q=pro+restore$
RewriteRule ^(.*)$ http://www.mydomain.com/nsearch/?q=pro+restore [R=301,L]

But it doesn't work. Any ideas on what I am missing?

Thanks

1 Answer 1

1

Try this code in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

RewriteCond %{QUERY_STRING} ^brand=1076&mode=grid&product_category=5533&(q=pro\+restore)$ [NC]
RewriteRule ^catalogsearch/result/index/?$ /nsearch/?%1 [R=301,L]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.