Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
if ($query_string ~ "^(?<pre>.*?)(&?fbclid=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
rewrite ^(.*)$ $1?$pre$post?;
}
if ($query_string ~ "^(?<pre>.*?)(&?utm_source=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
rewrite ^(.*)$ $1?$pre$post?;
}
if ($query_string ~ "^(?<pre>.*?)(&?utm_medium=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
rewrite ^(.*)$ $1?$pre$post?;
}
if ($query_string ~ "^(?<pre>.*?)(&?utm_campaign=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
rewrite ^(.*)$ $1?$pre$post?;
}
if ($query_string ~ "^(?<pre>.*?)(&?utm_term=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
rewrite ^(.*)$ $1?$pre$post?;
}
if ($query_string ~ "^(?<pre>.*?)(&?utm_content=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
rewrite ^(.*)$ $1?$pre$post?;
}
if ($query_string ~ "^(?<pre>.*?)(&?gclid=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
rewrite ^(.*)$ $1?$pre$post?;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.