set $pcebessadei "http://pcebessadei.competence-e.kit.edu"; location ~ /adei-hiu/(.*) { proxy_pass $pcebessadei/adei-hiu/$1$is_args$args; } location /adei-battery-partner(.*) { proxy_pass $pcebessadei/adei-battery-partner/$1$is_args$args; } #RewriteRule ^/adei-smartgrid(.*) http://adei-smartgrid.kaas.kit.edu$1?%{QUERY_STRING} [L]