Possible Duplicate:
Support for URL rewriting?

I have some files under SharePoint 2010's SiteCollectionImages library. But I need to access them as root, for eg http://abc.com/image123.gif must be possible, though image123.gif is in root web's SiteCollectionImages library. I did put a Rewrite Rule in IIS, but I get a 404. in the uls logs, I can see the request going into SharePoint, but from their it returns 404 error code.

I can check via sharepoint designer that the file is there and its content type is set to Image. In Firefox I get "image cannot be displayed as it contains errors" and IE shows just 404.

Any ideas?


2 Answers 2


Can't you just move or copy the image files to the root of your SharePoint site? You can do this in SharePoint Designer. If your required URL has the image at the root, that is where I would put the image files.

I would also avoid rewriting if at all possible. It can break things in SharePoint and isn't supported.

  • the images are at the root sc only in the SCI library. But you are right, the more I think of it, the iis rewrite rule makes sp look into the physical directory, likely within _layouts. I see some ULS logs pointing to this effect. SiteCollectionImages being part of "virtual dir" may be isn't handled that way.
    – vasya10
    Jun 15, 2011 at 3:16

If your site collection is the root site collection you can just use: "/SiteCollectionImages/image123.gif" since this will default to the root site collection.

If your site collection is not the root (e.g. http://server/sites/mySiteCollection), then you'll need this syntax:

<% $SPUrl:~SiteCollection/SiteCollectionImages/image123.gif %>

Not the answer you're looking for? Browse other questions tagged or ask your own question.