0

I have a WordPress site and need to redirect some URLs based on a query string.

The link is /?product_brand=brandname

I need to redirect them all to /?product_bisbrand=brandname

Can someone point me in the right direction, please?

1 Answer 1

1

Try putting this somewhere appropriate in the htaccess file in your document root:

RewriteEngine On
RewriteCond %{QUERY_STRING} (.*)product_brand=([^&]+)&?(.*)
RewriteRule ^(.*)$ /$1?%1product_bisbrand=%2&%3 [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.