How do I configure IIS for URL Rewriting an AngularJS application in HTML5 mode?

后端 未结 7 2262
春和景丽
春和景丽 2020-11-22 12:12

I have the AngularJS seed project and I\'ve added

$locationProvider.html5Mode(true).hashPrefix(\'!\');

to the app.js file. I want to confi

7条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 12:24

    In my case I kept getting a 403.14 after I had setup the correct rewrite rules. It turns out that I had a directory that was the same name as one of my URL routes. Once I removed the IsDirectory rewrite rule my routes worked correctly. Is there a case where removing the directory negation may cause problems? I can't think of any in my case. The only case I can think of is if you can browse a directory with your app.

    
      
      
        
      
      
    
    

提交回复
热议问题