Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

how to restrict file viewing as "Save As"

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  is this a valid apache log format, if not, what c..  
Author Message
Mel

External


Since: Feb 13, 2008
Posts: 2



(Msg. 1) Posted: Wed Feb 13, 2008 11:56 am
Post subject: how to restrict file viewing as "Save As"
Archived from groups: alt>apache>configuration (more info?)

I need my apache server to only allow ".txt" and ".html" files to be
viewed. ALL other files should be "Save As" dialoged.

Is this possible ?
any example is highly appreciated.

I read something about application/stream-oct... but can not quite
understand where I should place this.

I have a download area llike: /mnt/downloads, and any file from this
area should be saved and not opened for viewsing such as pdf files or
docs.

many thanks in advance

 >> Stay informed about: how to restrict file viewing as "Save As" 
Back to top
Login to vote
Brendan Gillatt

External


Since: Dec 15, 2007
Posts: 8



(Msg. 2) Posted: Wed Feb 13, 2008 11:25 pm
Post subject: Re: how to restrict file viewing as "Save As" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mel wrote:
> I need my apache server to only allow ".txt" and ".html" files to be
> viewed. ALL other files should be "Save As" dialoged.
>
> Is this possible ?
> any example is highly appreciated.
>
> I read something about application/stream-oct... but can not quite
> understand where I should place this.
>
> I have a download area llike: /mnt/downloads, and any file from this
> area should be saved and not opened for viewsing such as pdf files or
> docs.
>
> many thanks in advance

See
http://httpd.apache.org/docs/2.2/mod/core.html#forcetype

Specifically the examples listed beneath the explanation.

To make IE open the 'Save As' dialogue you can set the mime type to
application/octet stream. Note that this will probably not work for all
browsers.

- --
Brendan Gillatt | GPG Key: 0xBF6A0D94
brendan {a} brendangillatt (dot) co (dot) uk
http://www.brendangillatt.co.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)

iD8DBQFHs3xbuv4tpb9qDZQRAvPOAJ4qQS4uyKFPl3uaxeia96I2q4OrtgCcCbAK
6g+Lss2BXgxbog+FTg/KUng=
=8CNI
-----END PGP SIGNATURE-----

 >> Stay informed about: how to restrict file viewing as "Save As" 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
.htaccess - Restrict file access - Is it possible to restrict the download of files to one specific web page ? IE: directory called /files/ Full of word docs, pdf's and exe's. Is it possible to restrict the download of these file to links coming from one specific page: ie: filelink.php...

How can i restrict the size of file uploads and downloads - I have a webserver that has various websites on it. What I want to be able to do is configure apache so that it will not allow files larger than about 5Mb to be downloaded. Therefore if it has some large files on it. They are not permitted to be..

Directory Browsing, file viewing - I attempting to setup my 2.0.47 configuration so that a developer can directory browse a directory of log files temporarily so I dont have to keep sending them to him. I've got the browse working fine with "Options Indexes" directive. I see the...

File ownership and can anyone save ralf's dog? - I have a user called "ralf" but Apache server runs as the user "apache". The problem is that Apache (aided by PHP) have unzipped an archive but the file owner is now "apache" and poor old "ralf" can't edit them w...

restrict ssl - I want to restrict a directory containing cgi scripts to only be accessed via https.
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]