Map.rewrite problem - remap a file request to a url

I have a rewrite i need to do. I have a flash app that’s asking for a
file with this location:

/millionaire/millionaire_quizzes/123/data/questions.XML

Instead, i want it to load the xml which is generated for this url:

/millionaire/millionaire_quizzes/123.xml

I’m having problems getting the rewrite working. i thought this would
do it:

map.rewrite “/millionaire/millionaire_quizzes/:id/data/questions.XML”,
“/millionaire/millionaire_quizzes”, :type => “text/xml”

But i get this error:

ActionController::MissingFile (Cannot read file
/home/max/work/e_learning_resource/trunk/public/millionaire/millionaire_quizzes):
/var/lib/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/streaming.rb:76:in
send_file' /vendor/plugins/redirect_routing/lib/redirect_routing_controller.rb:16:inrewrite’

It looks like it’s still expecting to get a file back. Do i need to set
something in the :disposition option maybe?

thanks, max

I figured it out, i used a connect instead. Not sure if this is the
best solution so still happy to receive advice :slight_smile:

map.connect “/millionaire/millionaire_quizzes/:id/data/questions.XML”,
:controller => ‘millionaire_quizzes’, :action => ‘show’, :format =>
“xml”