New answers tagged

0

map is a better way to perform these kinds of conditional things. Add the following to http level in nginx config: map $http_user_agent $upstream { ~robot "localhost:6000/Page/Get?url=https://test.page$request_uri"; default localhost:5000$request_uri; } And then use $upstream as target: proxy_pass http://$upstream;


0

In the config (whether that be the main apache config or vhosts block) Add: RewriteEngine on RewriteRule "^/test/*" "/testhandler/" [PT] respectively. See: https://httpd.apache.org/docs/2.4/rewrite/ https://httpd.apache.org/docs/2.4/rewrite/remapping.html https://httpd.apache.org/docs/2.4/rewrite/flags.html


Top 50 recent answers are included