How to solve Redirect Loop

后端 未结 4 2045
半阙折子戏
半阙折子戏 2021-01-13 08:25

I have a web application, and some users who use Chrome as their preferred browser of choice, get the following error when they have logged out of the application, and try t

4条回答
  •  长发绾君心
    2021-01-13 08:44

    Try adding this to your web.config file:

      
        
          
            
            
          
        
      
    

    This will turn off any authorization for this page and should stop Your loop.

    You can also add this:

      
        
          
            
            
          
        
      
    

    This will deny access to your login page to all users that are already authenticated. Combining those two should allow You to add custom errors for all redirections.

    You may also consider creating a directory for unauthorized access (eg. public/) and placing inside all error pages (that do not require being authorized). Then You can do:

      
        
          
            
            
          
        
      
    

    You can read more about location here. And more about authorization here.

提交回复
热议问题