Use the following code to jump to the specified server {code ...} now, if you want to get the IP address of the nginx server on the server to which you want to jump, the commonly used code for getting the nginx server does not seem to be available. Is there a way to get the IP address? & Amp; lt ;? Php $ ip $ _ SERVER [& quot; REMOTE _... use the following code to jump to the specified SERVER.
Rewrite ^/(. *) $ http://xxxx.cn/index.php? Id =/$1 permanent;
Now, if you want to get the IP address of the nginx server on the server to which you want to jump, the commonly used code for getting the nginx server does not seem to be available. Is there a way to get the IP address?
$ Ip = $ _ SERVER ["REMOTE_ADDR"];
Echo $ ip;
?>
Reply content:
Use the following code to jump to the specified server.
Rewrite ^/(. *) $ http://xxxx.cn/index.php? Id =/$1 permanent;
Now, if you want to get the IP address of the nginx server on the server to which you want to jump, the commonly used code for getting the nginx server does not seem to be available. Is there a way to get the IP address?
$ Ip = $ _ SERVER ["REMOTE_ADDR"];
Echo $ ip;
?>
NginxRewrite
It is an http redirection that notifies the browser to request a new address. you can use cookies or URLs to pass the parameters you need to the server to jump.