0

I used Facebook social login for my website and when it happens in the final step facebook redirects to my website with a appended ID. So my URL looks like below.https://example.com/#_=_. I need to remove this and redirect to my website without this hash ID.

Need to do this in the htaccess. But everything I've tried failed.

Below I've tried.

RewriteRule ^#_=_(.*)$ https://example.com [R=301,L]
RewriteRule ^#_=_()$ https://example.com [R=301,L]
04FS
  • 5,660
  • 2
  • 10
  • 21
i am batman
  • 581
  • 3
  • 6
  • 21
  • 2
    You don’t, because you simply _can’t_ … The fragment portion of the URL does not get send to the server in the first place. – 04FS Jan 23 '20 at 12:54
  • Its not nice to have something like this in the url :( – i am batman Jan 24 '20 at 04:09
  • Well then you’ll have to remove it on the client side, using JavaScript. – 04FS Jan 24 '20 at 07:17
  • Does this answer your question? [Facebook Callback appends '#\_=\_' to Return URL](https://stackoverflow.com/questions/7131909/facebook-callback-appends-to-return-url) – MrWhite Jan 24 '20 at 22:16

0 Answers0