I am having a problem updating a tab on my website:
I copied this rewrite rule from github:
<rule name="Main Rule" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="/" /> </rule>
This works great on a path such as https://www.mywebsite.com/dashboard .
However, when I update the path, for example https://www.mywebsite.com/tab/settings , my javascript loads fine, but my css directory is disabled by 1.
My script loads like this:
https://www.mywebsite.com/Scripts/angular.js
However, my CSS is trying to load as:
https://www.mywebsite.com/tab/Content/bootstrap.min.css
Using / tab / causes my problem.
My routes:
.state('Template', { url: '', abstract: true, views: { 'header': { templateUrl: 'App/SharedViews/Landing/dashboardheader.html' } } }) .state('Template.AdminTab', { url: '/admin', views: { ' container@ ': { templateUrl: 'App/Views/Admin.html' } } }) .state('Template.Tab.Company', { url: '/company', views: { ' container@ ': { templateUrl: 'App/Views/Admin.html' }, ' tabs-views@ ': { templateUrl: 'App/Views/Company.html' } } }) .state('Template.Tab.Users', { url: '/users', views: { ' container@ ': { templateUrl: 'App/Views/Admin.html' }, ' tabs-views@ ': { templateUrl: 'App/Views/Users.html' } } })
How can I change the rewrite rule to load css correctly on URLs with a depth of 2+?