[EMAIL PROTECTED] (Steve Piner) wrote:
>My suggestion is to use mod_rewrite to create a mapping so that the
>actual file name doesn't matter. I have a rule in the Apache conf file:
>
>RewriteRule ^/reports/ /bin/report.pl [PT]
>
>So going to <http://www.mysite.com/reports/foo.csv?param1=val1> would be
>the same as going to <http://www.mysite.com/bin/report.pl?param1=val1>
>except if the page is to be downloaded, the browser will use the name
>foo.csv.

That doesn't solve the problem, though.  The type of file is chosen in a
form, and the action of the form is already set by the time that form is
loaded.  I assume Jay doesn't want to use Javascript to change the
action dynamically.

My own preference would be to post to some generic script which
redirects to another URL with the desired filename extension and proper
disposition headers.


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  [EMAIL PROTECTED]                            The Math Forum

Reply via email to