开发者

Hash breaks .htaccess

I'm using this .htaccess to forward a text and an url to Twitter:

RewriteEngine On
RewriteCond %{QUERY_STRING}  ^mytxt=(.*)&myurl=(.*)$
Rewrit开发者_运维百科eRule ^(.*)$ http://twitter.com/intent/tweet?related=aprofile&text=%1&url=%2&via=myprofile [R,L]

It works fine as long no #hash is within the string. (With a #hash it returns just a 403 forbidden.) This is the URL: http://www.example.com/twitter/?mytxt=hello+world+#randomhash&myurl=http://example.com

How to fix that? Thanks Michael


Try using the URL encoded value for the # sign.

http://www.example.com/twitter/?mytxt=hello+world+%23randomhash&myurl=http://example.com

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜