问题描述
|
我正在使用此.htaccess将文本和URL转发到Twitter:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^mytxt=(.*)&myurl=(.*)$
RewriteRule ^(.*)$ http://twitter.com/intent/tweet?related=aprofile&text=%1&url=%2&via=myprofile [R,L]
只要字符串中没有#hash,它就可以正常工作。 (使用#hash只会返回禁止的403。)
这是URL:http://www.example.com/twitter/?mytxt=hello+world+#randomhash&myurl=http://example.com
如何解决?
谢谢
麦可
解决方法
尝试将URL编码的值用于
#
符号。
http://www.example.com/twitter/?mytxt=hello+world+%23randomhash&myurl=http://example.com