title: serve a single image with sinatra no matter whats asked for
body: <p>I'm serving an image with sinatra, but when you go the image, I want sinatra to serve up another image. So every image that is asked for on the server, will return a static image. </p>
  
  <pre><code>%w[sintra].each{|gem| require gem}
  
  # &lt;img src="https://www.mywebsite.com/1234.png"&gt;
  # &lt;img src="https://www.mywebsite.com/abcd.png"&gt;
  
  get '/:image' do 
   image = params[:image].split(".")[0]
   # image = 1234
  
   if image == key 
    #do stuff
   else
    #do other stuff
   end
  
   #this is where I'm having a problem
   special_code_that_replaces_1234.png = "static_image_on_server.png"
   #so sinatra should return "static_image_on_server.png" no matter what image is asked for. 
  
  end
  </code></pre>
  
  <p>I've looked through the documentation for sinatra. This specifically. 
  <a href="http://www.sinatrarb.com/intro.html#Accessing%20the%20Request%20Object" rel="nofollow">http://www.sinatrarb.com/intro.html#Accessing%20the%20Request%20Object</a>
  I may be looking at the wrong part, "Triggering Another Route"
  I think I'm running in circles. </p>
  
  <p>My app does have a "public" directory with "static_image_on_server.png" </p>