Develope using ASP.NET MVC
I have a website (Web Server) contains many pages and many static files (photo, css, ...).
Now I want to move these static files to another server (Resource Server).
[Reason: To Reduce the I/O loading on Web Server]
So, I need to process all the relative path in the pages
Then it can loading imgs(or other static files) from Resource Server after process
(e.g. <img src='/Content/Images/myPhoto.jpg' />
)
p.s. Some imgs are generate dynamically by javascript.
and I don't want to use @Razor
Is there has any efficient or easily way to solve it.
(maybe like CDN's processing way but not use CDN service)
I had not process similar problem like it.
Hoping everybody can give me some suggestions. Thanks a lot!
You are describing a CDN or Content Management System. These are easy to combine with Razor, so I dont see any reason not to use existing methods to solve your problem.
There is a reasonable guide to doing this already on Stack Overflow. Best way to switch between static assets and CDN based assets for development and deployment
Did you search for ASP.net Razor CDN before posting the question ?