I find many solutions for similar case, but I can't find any for this one. I have some old urls with parameters to permanently redirect on homepage. There is example:
#old url https://www.example.com/?s=141&sid=5
#new url https://www.example.com
I'm trying to do some like this, but I can't find out how to make it works:
RewriteCond %{QUERY_STRING} ^s=141&sid=5
RewriteRule ^(.*)$ https://www.example.com [R=301,L]
This is not working either
Redirect 301 /?s=141&sid=5 https://www.example.com