V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
hoo
V2EX  ›  问与答

面子书“赞”链接出现错误

  •  
  •   hoo · Sep 18, 2013 · 3519 views
    This topic created in 4610 days ago, the information mentioned may be changed or developed.
    找遍了网络都找不到解决的方法,听说rewrite可以解决但是对nginx不熟悉,

    当从discuz like了一篇文章后,在面子书链接的链接后辍就会如下:

    http://example.com/?fb_action_ids=xxxxxxxx&fb_action_types=og.likes&fb_source=timeline_og&action_object_map=%7B"10151684756006297"%3A145347155674830%7D&action_type_map=%7B"10151684756006297"%3A"og.likes"%7D&action_ref_map=%5B%5D

    discuz 会显示非法字符无法链接,找到一些rewrite规则可以解决,但是是apache的,透过http://www.anilcetin.com/ 及 http://winginx.com/htaccess 的转化后却无法诠释。自己尝试修改过两天都无法达到效果,希望大家可以帮帮忙

    apache 的rewrite规则如下:
    RewriteCond %{QUERY_STRING} (.*)(^|&)fb_[^&]+(.*)$
    RewriteRule ^(.*) $1?%1%2 [R=301,L]
    RewriteCond %{QUERY_STRING} (.*)(^|&)action_[^&]+(.*)$
    RewriteRule ^(.*) $1?%1%2 [R=301,L]
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2440 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 04:50 · PVG 12:50 · LAX 21:50 · JFK 00:50
    ♥ Do have faith in what you're doing.