regex - How to urlencode (escape) strings in htaccess? -


i have case in htaccess

rewriterule ^.*$ https://example.com/ [co=ref:%{http_referer}:example.com:0:/] 

all need escape string %{http_referer} after half hour googling , reading apache docs seems can't solve 1 :)

so, how escape strings in apache?

if want escaping behavior need add line in apache config file:

rewritemap escape int:escape 

then restart apache server.

further need modify rewrite rule this:

rewriterule ^ https://example.com/ [co=ref:${escape:%{http_referer}}:example.com:0:/] 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -