Phat32
Phat32

Reputation: 31

IIS8 use web.config to rewrite url

I have a website that lives within a folder one level off the root of the website. This was done because it used to host multiple web applications, but the other application has been retired and now the domain is used for just the site. We want to move it out of the folder and into the root of the domain

Current: website.com/main/page.php
Want: website.com/page.php

The issue is all the links that are out there that have the old location. I would like to have a .config file that lives in the old directory and have it re-direct to the link by just removing "main" from the URL. What is the best way to go about doing this?

Upvotes: 0

Views: 205

Answers (1)

Melis
Melis

Reputation: 111

One way of doing this is by using HTTP redirect

This method is explained in this video: https://www.youtube.com/watch?v=wC3kJnhlofw

Upvotes: 1

Related Questions