IIS 7 and Above
Configuration & Scripting
Redirect based on URL
Last post Nov 30, 2014 10:40 PM by Bryan_802
Nov 19, 2014 10:58 AM|technoaddict|LINK
Not sure if this is the right group to ask. But I think the answer of my question has to do with scripting.
We have an ADFS setup running with one website (for example sts.company.com). ADFS has trusts with multiple external parties.
If you connect to a specific external party, you will be redirected to sts.company.com running on the ADFS server, on where you will have to authenticate. If you enter invalid credentials or cancel the authentication you will be prompted with a 401 error page.
What we now want is that if u come from a specific external party, IIS has to redirect you to the 401 page hosted at the External party.
But, when you come from other External Parties, you should just get the default IIS 401 error page.
Is it possible to add a piece of code inside the 401 error page, that extracts the URL? If a specific piece of text is in the URL, redirect the browser to the 401 hosted at the external party, else just show the default 401 error. Is this possible?
The 401 URL looks like this:
While the 401 if you come from another external party could like this
I wonder if its possible to add some code to the page that checks for 'example1.example.com' and if found, sent user to another webpage.
If not found, just show the 401 default.
Hope somebody knows if this is possible. And if so, can help me getting there.
Thanks in advance.
Nov 26, 2014 09:26 AM|Perkinsville|LINK
Without reading completely, you might want to look at URL Rewrite.
Nov 30, 2014 10:40 PM|Bryan_802|LINK
I am a engineer from AD team, and based on my experience and research, I don't think you can achieve this goal from AD side.