I'm using ASP.Net MVC, my bundles looks something like:
bundles.Add(new Bundle("~/bundles/rgmpjsbundle").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-ui-{version}.js",
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*",
"~/Scripts/modernizr-*",
"~/Scripts/jquery.address-1.5.js",
"~/Scripts/tabmenu.js",
"~/Scripts/knockout-2.2.0.js",
"~/Scripts/knockout.mapping-latest.js",
"~/Scripts/jquery-ui-1.10.3.custom.js",
"~/Scripts/KnockoutCustomBindings.js",
"~/Scripts/knockout-sortable*",
"~/Scripts/moment.js"));
This is pretty standard. the problem comes when I go to deploy my application, in the Development region. IIS is set up like the following (I know it's not great):
DEVWEBSITE
-> app 1
-> app 2
-> app 3
UATWEBSITE
-> app 1
-> app 2
-> app 3
However; production is set up differently in that each application has it's own web site. This is proving to be a right pain in my butt as under the DEV/UAT structure my application will jump all the way back to the DEV/UAT website (Shell site) with the ~ but in the PROD environment it will up back to the root of the web application. I would use relative referencing except I'm using MVC URL rewrites.
Does anyone have a solution to this problem? Maybe some setting on IIS7 to catch ~ references?