mod_rewrite urlencoding an already urlencoded query string parameter - any way to disable this?

前端 未结 1 442
天命终不由人
天命终不由人 2020-12-01 04:30

We have some very basic mod_rewrite rules:

RewriteRule ^something.swf$ http://www.newdomain.com/something.swf [R=302,L]

mod_rewrite seems t

相关标签:
1条回答
  • 2020-12-01 04:50

    the way to accomplish this is via the NE (no escape) paramater.

    RewriteRule ^something.swf$ http://www.newdomain.com/something.swf [R=302,L]
    

    should in fact read

    RewriteRule ^something.swf$ http://www.newdomain.com/something.swf [R=302,NE,L]
    

    this will force mod_rewrite to leave all query string values as they are, without doing any encoding / escaping.

    as easy as that :)

    0 讨论(0)
提交回复
热议问题