问题
I have this URL (urlencoded twice):
http%253A%252F%252Fwww.google.cl%252F%2523test (translated: http://www.google.cl/#test)
And this Rewrite Rule:
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 redirects to http://www.google.cl/%23test instead of http://www.google.cl/#test
The problem ocurrs only with # (number sign).
Any ideas?
回答1:
Can you try NE
flag:
RewriteRule ^/?linkto/(.*?)/ ${unesc:$1} [R,L,NE,NC]
来源:https://stackoverflow.com/questions/18990593/apache-rewriterule-redirection-with-url-encoded