Avatar of Albert Widjaja
Albert Widjaja
Flag for Australia asked on

Windows Server 2102 R2 - IIS 8.5 redirection assistance ?

Hi,

How can I configure the IIS 8.5 in my Windows Server 2012 R2 to redirect:

www.domain.com/app to point to the www.domain.com (under the same webserver) ?

Because at the moment:
www.domain.com/app --> is showing IIS 404
www.domain.com --> works fine as my primary website.

Thanks.
Windows Server 2012Microsoft IIS Web ServerWeb Servers.NET App Servers

Avatar of undefined
Last Comment
Albert Widjaja

8/22/2022 - Mon
Dan McFadden

Is there a directory path that exists to that destination?  Or are you asking that any http error 404s get redirected to your home page?

Dan
Albert Widjaja

ASKER
I just want it to be redirected to standardise and make user easier to download the mobile app.
Dan McFadden

OK, but still need to know if the URL actually exists.  There are different ways to handle the situation.  If the path does not exist, you can capture the 404 and redirect.  If the path is real, you want to make sure you are only capture the path plus the default page, not any other pages in the path.

Dan
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Albert Widjaja

ASKER
Dan,

The 404 is the generic reply from IIS. There is no virtual directory with the /app in the Windows Server 2012 R2 web server.

If I open www.domain.com using my iPhone, it prompt me to download the Apple Store app which is what I want.
Albert Widjaja

ASKER
Dan, this is the error when I use my PC Browser to visit www.domain.com/app:

Server Error

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
ASKER CERTIFIED SOLUTION
Dan McFadden

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Albert Widjaja

ASKER
Thanks Dan.
It works as expected.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.