0

I have A list of different Query-IDs needed to be redirectd to other Sites and pages. Like:

RewriteRule ^/index.php?id=1111$ http://newdomain.tld/site.html [R=301,L,NE]
RewriteRule ^/index.php?id=2222$ http://nextdomain.tld/othersite.html [R=301,L,NE]

But this example does not work as the source contains a query string. I am a bit stuck. Hopefully the solution is quite simple, but can you help me`? Thanks.

1 Answer 1

1

For query string you have to use below rule with condition, this is one example, I am assuming you can create multiple optimized rules using below.

RewriteCond %{QUERY_STRING} ^id=1111$
RewriteRule ^ http://newdomain.tld/site.html [R=301,L,NE]
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.