1

Ignore the base problem. My custom built javascript library is moronic when it comes to looking up resources. Ok, it's me, but I don't care. At this point I'm looking for an ugly work around.

The client requests

http://localhost/Activities/Index/dojo/resources/blank.gif

and I want to say, your're a moron behind my teeth, but front with a smile and serve the image which of course is located at

http://localhost/dist/dojo/resources/blank.gif

No redirect. I guess it's what's called a rewrite. Solve that for me, please. Either in the route table or web.config, whichever performs the best.

1 Answer 1

2

This could be easily achieved with the IIS 7.0 rewrite module:

<rewrite>
  <rules>
    <rule name="resources">
      <match url="Activities/Index/(.*)" />
      <action type="Rewrite" url="dist/{R:1}" />
    </rule>
  </rules>
</rewrite>
Sign up to request clarification or add additional context in comments.

1 Comment

Great thanks. That's a regexp right? So Activities/Index/(.*(\.gif|\.png|\.js|\.css)) will work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.