Apache | [Dev|Web|Sys]Ops
image_pdfimage_print
Plus “+” in URL can cause redirection loop

Plus “+” in URL can cause redirection loop

The fix is to add nocanon to the proxy config. For example: ProxyPass / balancer://frontendcluster/ stickysession=ROUTEID nocanon ProxyPassReverse / http://10.1.1.1:9001/ nocanon ProxyPassReverse / http://10.1.1.2:9001/ nocanon http://httpd.apache.org/docs/2.2/mod/mod_proxy.html Normally, mod_proxy will canonicalise ProxyPassed URLs. But this may be incompatible with some backends, particularly those that make use of PATH_INFO. The optional nocanon keyword suppresses this, and passes […]

Plus signs replaced with %252520 in query string

Plus signs replaced with %252520 in query string

We recently migrated one of our ¬†websites at work to a new platform ¬†and discovered that Nextopia was encoding plus (+) signs with “%252520”, which completely broke our rewrites. A simple fix was to include this rewrite: RewriteCond %{QUERY_STRING} (.*?)%(25)+20(.*?%(25)+20.*) RewriteRule ^ %{REQUEST_URI}?%1+%3 [N] RewriteCond %{QUERY_STRING} (.*?)%(25)+20(.*) RewriteRule ^ %{REQUEST_URI}?%1+%3 [L,R=301] The solution was provided […]

image_pdfimage_print