If you need to redirect all URLs that have ?go=product then try this code in your .htaccess file (at the top):
RewriteEngine On
RewriteCond %{QUERY_STRING} go=product
RewriteRule ^(.*) /?redirect_to=random [L,R=301]
If you also need that /post-redirect/ part you could try:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/post\-redirect/$
RewriteCond %{QUERY_STRING} go=product
RewriteRule (.*) /?redirect_to=random [L,R=301]
If you cannot access your .htaccess file you could try a plugin that lets you redirect to custom URLs.
Please note that ?redirect_to=random always goes to posts, while you write go=product.
thanks for your answer
but I need to keep the URL go=product into random post
source: website.com/post-redirect/?go=product
Target: website.com/?redirect_to=random
then
website.com/random-post/?go=product
I want to keep the URL ?go=product into my new random post
Sorry, my English is bad, thank you
Currently it is only possible to add tracking parameters. I will think about a possibility to whitelist more parameters (maybe in a constant) so that also “go” would work.
Thank you for the response, I hope for the next update