Apache Redirect IP Address
- 
 Dears, i have two Web Servers configured with Apache on AIX Power Servers , i need to make 
 anyone who accesses the IP Address of the Server-1 to be redirected to the IP Address of the Server-2.
 i have added the below in the httpd.conf of Server-1 but not working with me
 RewriteRule ^(.*)$ https://the.other.ip.address$1
- 
 Have you tried it without using SSL? Off the top of my head I'm not 100% postivite but I believe most browsers may prevent url redirects with https for obvious reasons. 
- 
 @Jason said in Apache Redirect IP Address: Have you tried it without using SSL? Off the top of my head I'm not 100% postivite but I believe most browsers may prevent url redirects with https for obvious reasons. Nginx has no issues with it. It is a redirect after landing it should be fine. Nothing bad about that. The SSL path is still valid. 
- 
 @AlyRagab said in Apache Redirect IP Address: Dears, i have two Web Servers configured with Apache on AIX Power Servers , i need to make 
 anyone who accesses the IP Address of the Server-1 to be redirected to the IP Address of the Server-2.
 i have added the below in the httpd.conf of Server-1 but not working with me
 RewriteRule ^(.*)$ https://the.other.ip.address$1I'm not familiar with Apache redirects. But Google told me this. 
 http://stackoverflow.com/questions/31141092/apache-mod-rewrite-needs-to-keep-the-path-but-change-the-domainYou use a condition and a rule. RewriteCond %{HTTP_HOST} !^(www\.)?exploreworlds\.co\.uk [NC] RewriteRule ^(.*) http://www.exploreworlds.co.uk/%{REQUEST_URI} [R=301,L]So if your condition is matching, this would be the rule. RewriteRule ^ http://the.other.ip%{REQUEST_URI}
- 
 @JaredBusch said in Apache Redirect IP Address: @Jason said in Apache Redirect IP Address: Have you tried it without using SSL? Off the top of my head I'm not 100% postivite but I believe most browsers may prevent url redirects with https for obvious reasons. Nginx has no issues with it. It is a redirect after landing it should be fine. Nothing bad about that. The SSL path is still valid. Very possible it might be iframes I was thinking of. 
- 
 @JaredBusch said in Apache Redirect IP Address: @AlyRagab said in Apache Redirect IP Address: Dears, i have two Web Servers configured with Apache on AIX Power Servers , i need to make 
 anyone who accesses the IP Address of the Server-1 to be redirected to the IP Address of the Server-2.
 i have added the below in the httpd.conf of Server-1 but not working with me
 RewriteRule ^(.*)$ https://the.other.ip.address$1I'm not familiar with Apache redirects. But Google told me this. 
 http://stackoverflow.com/questions/31141092/apache-mod-rewrite-needs-to-keep-the-path-but-change-the-domainYou use a condition and a rule. RewriteCond %{HTTP_HOST} !^(www\.)?exploreworlds\.co\.uk [NC] RewriteRule ^(.*) http://www.exploreworlds.co.uk/%{REQUEST_URI} [R=301,L]So if your condition is matching, this would be the rule. RewriteRule ^ http://the.other.ip%{REQUEST_URI}And make sure your config files get hit (correct vhost etc). Check logfiles. 
- 
 @JaredBusch tried it but not working , so can i do it using mod_proxy ?. 
- 
 @AlyRagab said in Apache Redirect IP Address: @JaredBusch tried it but not working , so can i do it using mod_proxy ?. mod_proxy is a total different thing. It's a reverse proxy, acting as a client to another webserver. As for your planned HTTP 301/302: I guess millions of Apaches do this simple kind of forward today. No need for mod_proxy. 
- 
 @thwr Thanks thwr for your reply , 
 now i need to configure IP Based Redirection not URL Naming as i dont have a DNS Settings at this moment and the above suggestion is about URL Redirection so how can we do that ?.
- 
 it is Done now and working very good: RewriteEngine On RewriteRule ^/ibclient$ https://remote_ip_address:port [R,L] Thanks All  


