Sunday, February 26, 2012

CSS and JavaScript Not Loading After URL Rewriting ASP.NET 4.0

Hi There...
while working on a project i needed URL rewriting for it. I searched over internet and got a beautiful and detailed article by "Scott". Finally i have done rewriting but i got another problem that my CSS and JavaScript files are not going to be attached again with my project and my project looks too bad now without colours. so here is the solution which works for me.

Note: You have to change this when you are working on local server or development server.


Note: When you finished your development and going to deploy on your web server just change it to following


CSS path after IIS url rewrite or your web.config rewrite or CSS not working after using URL rewriting is a common problem.  so you must set the paths like above. Note that its not only the solution for this problem. Just google out your problem and you'll got a lot of solutions about this problem.

Many Thanks

No comments:

Post a Comment