Link to home
Start Free TrialLog in
Avatar of bhodge10
bhodge10

asked on

Need to have a site redirect to a new virtual directory

Hello,

There is a link on my clients site that goes to  www.xxxxxx.com/clients/login.aspx. This link is/was hosted on a server at my clients office. I removed this old server and the application that /clients/login.aspx was going to.  Then I had to install a new server and install a new application for their customers to log into, however it created  the site www.xxxxx.com/onlinebooking.  

Is there a way within IIS to create a page or virtual directory so that when it receives the request for www.xxxx.com/clients/login.aspx that it automatically redirects to www.xxxxx.com/onlinebooking?

I would request the webhost company update the site with the new link, but it would be cost prohibitive and the client will be moving to a new host in the near future.

Thanks,
Avatar of Andrej Pirman
Andrej Pirman
Flag of Slovenia image

As I understand, you have web page OUTSIDE your local site, so you cannot do it with IIS on your local side.
The easiest way to do that is to create a file /clients/login.aspx and put plain HTML META redirect:
<html>
<head>
  <meta http-equiv="refresh" content="0;url=http://www.xxxxx.com/onlinebooking/" />
</head>
<body>
</body>
</html>

Open in new window

Avatar of Brendan M
you could also install URL REWRITE (http://www.iis.net/downloads/microsoft/url-rewrite)

and create a rule for it, though this would be more useful if you are wanting to forward multiple pages

Labsy post would be easiest for 1 page
Avatar of bhodge10
bhodge10

ASKER

It would be for 1 page. So stupid question, how do I go about adding a new page /clients? I assume I can just use notepad to create the login.aspx file, correct?
ASKER CERTIFIED SOLUTION
Avatar of Brendan M
Brendan M
Flag of Australia 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
That's what was tripping me up, the virtual directory. I added the folder and then the file and now it redirects. Thank you for helping!