16

I have a virtual host set up to redirect ntung-gitblit.localhost --> myserver:1279. However, it's not working with forward encoded slashes (%2f). The URL I'm trying to access is,

http://ntung-gitblit.localhost/ABC%2fXYZ

Without AllowEncodedSlashes, it fails -- apache tries to access /error/HTTP_NOT_FOUND.html.var on the server. Setting AllowEncodedSlashes to On results in the following internal URL hit,

http://myserver:1279/ABC/XYZ

And setting AllowEncodedSlashes to NoDecode results in the following URL being hit,

http://myserver:1279/ABC%252fXYZ

In other, words, it's over-escaping or under-escaping. Question: How do I make it hit myserver:1279/ABC%2fXYZ?

1 Answer 1

19

Sorry, just got it (3rd answer here), the solution is to use nocanon in the ProxyPass directive,

AllowEncodedSlashes On
ProxyPass / http://myserver:1279/ nocanon

I can delete the question if it's no longer helpful.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .