hoo
V2EX  ›  问与答

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

  •  
  •   hoo · Sep 18, 2013 · 3594 views
    This topic created in 4648 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   ·   5339 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 462ms · UTC 09:10 · PVG 17:10 · LAX 02:10 · JFK 05:10
    ♥ Do have faith in what you're doing.