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.
LVL 9
Senior IT System EngineerIT ProfessionalAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan McFaddenSystems EngineerCommented:
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
0
Senior IT System EngineerIT ProfessionalAuthor Commented:
I just want it to be redirected to standardise and make user easier to download the mobile app.
0
Dan McFaddenSystems EngineerCommented:
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
0
The Five Tenets of the Most Secure Backup

Data loss can hit a business in any number of ways. In reality, companies should expect to lose data at some point. The challenge is having a plan to recover from such an event.

Senior IT System EngineerIT ProfessionalAuthor Commented:
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.
0
Senior IT System EngineerIT ProfessionalAuthor Commented:
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.
0
Dan McFaddenSystems EngineerCommented:
I understand that the 404 is the default 404 response from IIS.  What I do not understand is why you would want to build a redirect like this.

If the app installs fine from your home page, why do you need the /app redirect?  IMO, this is making the configuration of your site more complex than it needs to be.  Unless there is a legacy reason for the /app path...

I have to ask again... do you want only the 404 error for the path "/app" top be redirected to the home page or all 404s, since you mentioned standardizing something.

The simplest way to do this is:

1. Open IIS Manager, navigate to the site where you want to create the redirect
2. create a new Virtual Directory, name it "app" and point it to the root content directory.
3. select the Virtual Directory "app" and go into the HTTP Redirect feature
4. enable "Redirect requests to this destination:" and enter the full URL for your home page:  http://www.mydomain.com/
5. Apply the change

This will redirect traffic to the app location to the URL defined in the redirect.

Dan
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Senior IT System EngineerIT ProfessionalAuthor Commented:
Thanks Dan.
It works as expected.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.