I make use of the bundling features in MVC4 by calling bundles.EnableDefaultBundles();
, this allows me to browse to http://website.com/content/css
which outputs a singular file of all the CSS files in the /content
directory - great.
The issue is I have the following route which loads a blog post from the DB by title: /post/{anything}
and in this case {anything}
is css
(for arguments sake, I can't change it) so the bundling is getting confused and trying to bundling everything in the post
directory, which doesn't exist.
Is there any way to exclude a particular URL format or route from being bundled? I think not calling EnableDefaultBundles()
would work but does that mean I would have to create bundles for everything manually?