Remove fbclid argument from the URL in Nginx
http { | |
... | |
# redirect map in http block - remove fbclid argument from the end | |
map $request_uri $redirect_fbclid { | |
"~^(.*?)([?&]fbclid=[a-zA-Z0-9_-]+)$" $1; | |
} | |
... | |
server { | |
... | |
# if redirect map is active, do 301 to the new url | |
if ( $redirect_fbclid ) { | |
return 301 $redirect_fbclid; | |
} | |
... | |
} | |
} |
This comment has been minimized.
This comment has been minimized.
Thank you for this. |
This comment has been minimized.
This comment has been minimized.
works |
This comment has been minimized.
This comment has been minimized.
works |
This comment has been minimized.
This comment has been minimized.
Thank you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Thanks a lot.