简体   繁体   中英

Invisible htaccess redirection to dedicated server IP adress

Here is my .htacess :

RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^code/$ http://xxx.xxx.xx.xx/code.php [L]

but when I go the http://domain.com/code/ the url is rewrited to xxx.xxx.xx.xx/code.php

Is it possible to make an invisible redirection to a Dedicated Server IP adress ?

What you need is a reverse proxy, what it does is that the first web server receives the requests and connects to the second server on xxx.xxx.xx.xx ip address. In this way the user never has direct access to the xxx.xxx.xx.xx server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM