How to encode special characters using mod_rewrite & Apache?

前端 未结 5 1166
逝去的感伤
逝去的感伤 2020-11-29 07:38

I would like to have pretty URLs for my tagging system along with all the special characters: +, &, #, %, and =

5条回答
  •  天命终不由人
    2020-11-29 07:44

    I finally made it work with the help of RewriteMap.

    Added the escape map in httpd.conf file RewriteMap es int:escape

    and used it in Rewrite rule

    RewriteRule ([^?.]*) /abc?arg1=${es:$1}&country_sniff=true [L]
    

提交回复
热议问题