URL Redirect based on logged in user [Answered]RSS

8 replies

Last post Apr 12, 2011 05:03 PM by amccollough

  • URL Redirect based on logged in user

    Feb 11, 2009 04:31 AM|kalyan.nistala|LINK

    Hello,

    Using URL Rewrite module, I am trying to redirect URL based on the client user who is accessing the URL. I tried all the variables in the Conditions section of the URL Rewrite rule like: {LOGON_USER}, {REMOTE_USER}, {AUTH_USER}. I also tried apprending HTTP_ infront of these varialbes. None of them worked. The user is a domain user and the site is intranet site using windows authentication.

    Can someone pls help me solving this issue?

    Thanks,

    Kalyan

  • Re: URL Redirect based on logged in user

    Feb 11, 2009 01:32 PM|ruslany|LINK

    URL rewriter runs before any authentication happens in IIS, so these server variables are not set and hence cannot be used in rewrite rules.

    We are considering changing that in future versions of URL rewriter, but currently it is by design. You may want to try other third party rewriting components or implement an ASP.NET module that will do the redirection. Here is an example of how to do it: http://mvolo.com/blogs/serverside/archive/2007/05/24/Redirect-clients-in-your-application-with-HttpRedirection-module.aspx

    redirection

  • Re: URL Redirect based on logged in user

    Feb 11, 2009 02:01 PM|kalyan.nistala|LINK

    Ruslan, thank you for your prompt response. This helps.

  • Re: URL Redirect based on logged in user

    Aug 07, 2009 09:15 AM|ffcardil|LINK

    The docs say that remote_user is available. Has that changed since this post?

    Thanks

    Frank

  • Re: URL Redirect based on logged in user

    Aug 07, 2009 12:57 PM|ruslany|LINK

    No, this has not changed. Which docs say that?

  • Re: URL Redirect based on logged in user

    Aug 07, 2009 01:14 PM|ffcardil|LINK

    I am not sure. I will try to locate it again. It said that server variables were available to use as conditions. The example did not use REMOTE_USER. Maybe I assumed that it was available to use. Is there a way to say all users from a certain domain get routed here.

    Remote user returns  gpuser\ffcardil

     I want to some identify all gpuser users and redirect their page.

     Any ideas?

     Frank

  • Re: URL Redirect based on logged in user

    Oct 30, 2009 01:18 PM|themphill|LINK

    Are you still considering changing when the URL rewriter runs?  If so, what is the time frame?  Are we able to change the order of how the modules are executed?

  • Re: URL Redirect based on logged in user

    Aug 06, 2010 07:16 PM|kalyan.nistala|LINK

    Hello Ruslan,

     Now that URL Rewrite Module 2.0 is available, I have downloaded it and tried redirecting based on logon user with {LOGON_USER}, {REMOTE_USER}. No luck. Do you have any clues here?

    Thanks,

    Kalyan

    iis 7 URL Redirect Problem LOGON USER

  • Re: URL Redirect based on logged in user

    Apr 12, 2011 05:03 PM|amccollough|LINK

    I have spent 5 hours search for the answer to this very question, and am dismayed to see that it basically cannot be done. Put me down as a very frustrated user who says a loud "YES" to the "should we allow REMOTE_USER to be used as a condition in URL Rewrite?"

    Maybe I'm just frustrated from so much lost time, but it seems like AUTH_USER should be available as a condition in a redirect rule.