redirect the entire php url with params (apache/nginx) -
1) how make apache redirect whole url parameters, , make visible client, example: when client comes :
https://domain1.com/app/index.php?device_id=wewewe&ordna_ver=5.0&num=+1234567890 it redirects him to:
https://domain2.com/app/index.php?device_id=wewewe&ordna_ver=5.0&num=+1234567890 2) also, how make same redirect not visible client (he still see url domain1.com while opening domain2.com) ?
3) , third, how make same 2 things (redirects) nginx ?
thank help.
in nginx, visible client:
server_name domain1.com; return https://domain2.com$request_uri; in nginx, hiding redirect being visible client:
server_name domain1.com; location / { proxy_pass https://domain2.com; } you might want use optional module http://nginx.org/docs/http/ngx_http_sub_module.html#sub_filter (requires recompilation of nginx), if want make sure replace mention of domain2.com proxied web-page domain1.com.
sub_filter "https://domain1.com" "https://domain2.com"; sub_filter_once off;
Comments
Post a Comment