Link to home
Start Free TrialLog in
Avatar of CLR Benjamin
CLR BenjaminFlag for France

asked on

Redirect URL to IP with IIS

Hello Experts,

I try to redirect an URL : https://share.contoso.com to an IP : http://10.0.1.95 with IIS.

I tried many ways: redirect url, URL rewrite...

There is no problem for http but I don't find the correct configuration to put a certificate on this site.
I just want a https://URL -> IP

The only thing I get is : 502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

Should I create a reverse proxy?
Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

You could create a default document that returns an HTTP 301 and serves a referral to the new server.  An ASP or ASPX page like this:

<%@ Language=VBScript %>

<%
Response.Status="301 Moved Permanently" 
Response.AddHeader "Location", "http://10.0.1.95"
%> 

Open in new window

Would you mind posting your solution?  It might help someone else.
seems fishy to me that you are trying to redirect a secure site to a non-secure site. and even worse, an IP address. What’s the use case for this?
ASKER CERTIFIED SOLUTION
Avatar of CLR Benjamin
CLR Benjamin
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial