Need help with removing fbclid query string from Facebook

carl

New Member
#1
Hi everyone,

My head is blowing up with this issue. My OpenLiteSpeed server is running with:
- OpenLiteSpeed 1.4.4
- WordPress
- LiteSpeed Cache – WordPress plugin

Everything works great. Pages, posts have been cached as well but if my visitor comes from Facebook, they will get the URL?fbclid=XXX without cache.

Anyone knows some ways to redirect URL?fbclid=XXX to URL? I did in .htaccess but no luck.

Any helps should be appreciated! Thank you.
 

carl

New Member
#4
Hi @carl, maybe you can give this try

Code:
RewriteCond %{QUERY_STRING} fbclid=(.*)
RewriteRule ^.*$ https://%{SERVER_NAME}%1/index.php [QSD,L]
Best
Thanks for reply my question. My htaccess content is:
Code:
RewriteCond %{QUERY_STRING} ^fbclid=(.*)
RewriteRule (.*) /$1? [R=301,L]
@Cold-Egg Mine and yours are working good, excepting the sub-page. Finally, I have figured out. I added the code to bottom of .htaccess WordPress file. Need adding to very top htacces file. That's all. :D

@Pong thanks man.
 
Top