Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to rewrite somehow to point to or even more broadly ?

Note: and are on separate machines and built with different technologies (one is ASP.NET and the other is PHP) but I have access to both of them.

I want that when I reference a picture like the picture to display correctly, even though there is not /Pictures folder on that server and the pictures has to be retrieved by going to

Ideally I want to do this in IIS6 to test it. However I am interested if it possible to do in any webserver (Apache, IIS7)

share|improve this question

migrated from May 25 '10 at 13:55

This question came from our site for professional and enthusiast programmers.

Been a while since I worked with Asp.NET but you could write a http module that handles this for you.

share|improve this answer
Thank you, I didn't think about that, for some reason, will look into it. – Liviu May 25 '10 at 11:17

Use a .htaccess file (on, within which you want:

Redirect 301 /Pictures

Alternatively, you could use mod_rewrite:

RewriteEngine on
RewriteRule ^Pictures/(.*)$$1
share|improve this answer
Wouldn't that work? if I have a picture like this <img src=""; alt="some pick"/> will it display it correctly? – Liviu May 25 '10 at 11:16
I think you might need ModRewrite for that usage. Hold on – Eric May 25 '10 at 11:26
Thanks, I'll try that! – Liviu May 25 '10 at 11:33
Did both work, or just the second one? – Eric May 25 '10 at 11:39
Couldn't make it to work with neither yet, but it seems the second one is the right way to go, I will give it a few more tries or try variations of this. – Liviu May 25 '10 at 13:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.