Redirect One Web Page to Another Website with IIS Server

In this blog post, I will show you how I redirect a web page hosted on IIS Server webserver to another web page hosted on a different domain.

Using IIS URL redirect module, we can control the flow of incoming requests to the server and control what to do with them.

In my case, I am migrating all the web pages of DeployContainers.com to this blog.

The mapping is one to one and posts are the same put on two different blogs.

Get Started

Below, I have my sources URL from DeployContainers.com.

https://www.deploycontainers.com/2018/01/09/visual-studio-2017-docker-support/

Below, I have the target URL on this blog (Ntweekly.com)

https://www.ntweekly.com/2019/09/28/visual-studio-2017-and-docker-support/

To create the redirect, I will open the URL Rewrite module on the DeployContainers.com website.

From the URL Rewrite Actions menu, I will click on Add Rule

From the Add Rule page, I click on Blank rule.

In the new rule page, I will name the rule.

In the Pattern page, I will type the URL part of the page only which is:

visual-studio-2017-docker-support

Note: This part is the most important part of this process, If you get this wrong the redirect will not work.

In the Action section,

Select Redirect

Type the target URL.

Click Save

After creating the rule, If needed you can use the Move Up to move above other rules like http to https.

This part is optional.

To see it in action, click on the URL.

https://www.deploycontainers.com/2018/01/09/visual-studio-2017-docker-support/

Conclusion

Things like this are only possible when you host your websites on a dedicated server.

If you are on hosted services, you cannot do this.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.