Answer the question
In order to leave comments, you need to log in
How to configure wordpress POST and GET request handler for gclid google adwords labels?
Hello! When setting up Google Adwords, they indicated the site url on wordpress, but the transition turns out to be a broken link, because Google adds its gclid tags to all ads , which come after ? (question mark), and the site engine treats it as a search on the site
How to configure the POST and GET request handler in the URL string so that the CMS (Wordpress) does not treat it as a search on the site?
I do according to
the guide , i.e. I add instructions to .htaccess
# BEGIN Remove Google Adwords query string
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} "gclid=" [NC]
RewriteRule (.*) /$1? [R=301,L,QSD]
<IfModule mod_rewrite.c>
# END Remove Google Adwords query string
Answer the question
In order to leave comments, you need to log in
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (^|&)gclid\=.+($|&)
RewriteRule (.*) /$1? [R=301,L,QSD]
RewriteCond %{QUERY_STRING} !(^|&)gclid\=.+($|&)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question