Skip to content

Instantly share code, notes, and snippets.

@lynt-smitka
Last active September 3, 2023 04:52
  • Star 11 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Remove fbclid argument from the URL in .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*?)(&?fbclid=[a-zA-Z0-9_-]+)$
RewriteRule ^(.*)$ /$1?%1 [L,NE,R=301]
</IfModule>
@ctrl-state-machine
Copy link

ctrl-state-machine commented Jun 12, 2021

added to my zwiicms apache server. work perfectly.

@pcbnl
Copy link

pcbnl commented Nov 24, 2021

Perfect

@bafmaamy
Copy link

Thank you

@rubikvn99
Copy link

rubikvn99 commented Jul 29, 2023

Remove all queries.

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{QUERY_STRING} ^(.*?)(&?[a-zA-Z0-9_-]+=[a-zA-Z0-9_-]+)$
  RewriteRule ^(.*)$ /$1?%1 [L,NE,R=301]
</IfModule>

@dorankin
Copy link

dorankin commented Sep 3, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment