Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question

marked as duplicate by Alex Angas Jul 14 '11 at 8:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

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.

share|improve this answer
    
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 '11 at 3:16
add comment

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 %>
share|improve this answer
    
Yes this is possible, but im not after that. Yes my sc is root sc. But I want to be able to access the image file via url "abc.com/image123.gif"; rather than "abc.com/SiteCollectionImages/images123.gif";. The later works fine, but im looking to make the former work. And the iis rewrite rule isnt helping. –  vasya10 Jun 15 '11 at 3:13
add comment

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