阿帕奇重写规则重定向使用URL连接codeD [英] Apache RewriteRule redirection with url encoded
本文介绍了阿帕奇重写规则重定向使用URL连接codeD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个URL(urlen codeD两次):
I have this URL (urlencoded twice):
http%253A%252F%252Fwww.google.cl%252F%2523test (translated: http://www.google.cl/#test)
和这个重写规则:
RewriteRule /linkto/(.*?)/ ${unesc:$1} [R,L]
如果我把这个网址在浏览器:
If i put this url in the browser:
http://localhost/linkto/http%253A%252F%252Fwww.google.cl%252F%2523test/data/
Apache的重定向到 http://www.google.cl/%23test 代替<一个HREF =http://www.google.cl/#test相对=nofollow> http://www.google.cl/#test
该问题只ocurrs以#(数字符号)。
The problem ocurrs only with # (number sign).
任何想法?
推荐答案
你能尝试 NE
标记:
RewriteRule ^/?linkto/(.*?)/ ${unesc:$1} [R,L,NE,NC]
这篇关于阿帕奇重写规则重定向使用URL连接codeD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文