Script for Removing part URL at htaccess

I have Url :

I want to change this link above to :

How to do this at .htaccess ?


1 answer

  • answered 2018-11-08 09:52 iiic

    fbclid is evil :D

    you can use something like

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{QUERY_STRING} ^(.*)?+&+fbclid=[^&]+((?!&?).)*$ [NC]
    RewriteRule ^/?(.*)$ /$1? [R=302,NE]
    RewriteCond %{QUERY_STRING} ^(.*)?+&+fbclid=[^&]+&?(.*)$ [NC]
    RewriteRule ^(.*)$ /$1%1%2 [R=302,L,NE]

    and you also must have mod_rewrite in your appache available and enabled