开发者

Moved website, now images broken

Unsure if this should be on here or serverfault so apologies if I'm wrong.

I just moved my site from one folder to another on my server (what happened was, I was doing an update, which didn't quite work, so I transferred all the old files back). Now all my images on the site are broken.

Does anyone know why this happens? Or how to fix it more importantly?

Any help/advice would 开发者_开发百科be appreciated! Thanks

EDIT: Okay, apparently I need to make sure the code is compiled, but completely lost as to how to do this..any ideas?

I'm also on a windows 2008 server, running IIS7. The application is written in C# .net MVC.


It doesn't seems that you have a compilation problem since the aplication is working. I mean, if you can run the website, but you are only missing the images, try to look for the paths and check if the image files are in there. For an MVC (C#) app you should have the directory like this:

root/global.asax
root/web.config
root/Views/..
root/Model/..

´root´ is gonna be your first public folder on the WebServer

Hope it helps!


Make sure the paths to your image files (and any files for that matter) are relative to the root directory of your web site. This way, if you ever move all of the files pertaining to your web site from one location to another, everything stays relative and nothing should be broken.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜