Re: [Vfs-devel] Correct filename without mod_rewrite
Status: Alpha
Brought to you by:
eesa
|
From: Tony K. <tk...@ca...> - 2000-06-06 23:06:25
|
----- Original Message -----
From: "Abdul-Wahid Paterson" <ee...@we...>
To: <vfs...@li...>
Sent: Tuesday, June 06, 2000 6:52 PM
Subject: [Vfs-devel] Correct filename without mod_rewrite
>
>
> When I first started developing VFS I had the problem that when the user
tries
> to download a file because it is a PHP script that returns the file the
> browser tries to save the file as get_file.php3
>
> To get around this problem I put in a mod_rewrite rule in the .htaccess
file
> as follows:
>
> RewriteRule ^(.*?)/file/.*$ get_file.php3?file=$1
[T=application/x-httpd-php3]
>
> This worked fine but it made VFS reliant on the user having mod_rewrite
>
> Someone today showed me how to do it without using mod_rewrite basically
all
> we have to do is add this header:
>
> header("Content-Disposition: inline\; filename=$file_name");
>
> The browzer then changes the filename to the given filename and saves it
as
> that rather than as get_file.php3
>
> I have tested it so far on Netscape 4.7, IE 5.5 and Lynx 2.8.3 and it
seems to
> work fine. Can anyone test it on any other browsers. Especially older
ones. I
> am not sure how long this feature has been implemented.
>
I'll test it under Netscape 4.0 (Linux), Netscape 4.0 (Win32), IE 4.0 / 5.0
(Win32), IE 3 (NT - this is a maybe/maybe not) and IE 5 (Mac).
Regards,
Tony Kirk
|