Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Serving and Management
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Serving and Management how to web server support forum

Reply
 
LinkBack Thread Tools
Old 04-09-2008, 04:14 PM   #1 (permalink)
Registered User
 
Join Date: Apr 2008
Posts: 3
OS: home xp


how do i block a file download with .htaccess?

hi, i would like to play a song on my index page, but not have the url let the link be "downloadable"
right now i have set the permissions on it to '666'
but then i cannot play the file.
can i use .htaccess to allow me to play the mp3, without it being able to be downloaded?
andrew_u is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 04-09-2008, 05:07 PM   #2 (permalink)
Fox
TSF Enthusiast
 
Fox's Avatar
 
Join Date: Sep 2002
Location: NJ
Posts: 7,752
OS: XP Pro, CentOS

My System

Send a message via ICQ to Fox Send a message via AIM to Fox Send a message via MSN to Fox Send a message via Yahoo to Fox Send a message via Skype™ to Fox
Re: how do i block a file download with .htaccess?

To the best of my knowledge, if it can be played or embedded, it can be downloaded.
__________________
Antec Neo Power 500W, ABIT IP35-E, Intel E2180@2.66Ghz, Corsair XMS2 2x1GB DDR2-800, PNY 8800GT, 320GB Seagate

* lazy college student alert *- If I've inadvertently ignored a thread, please Let me know about it

Have I helped you solve your problem?
Donate to Techsupportforums

Klart Skepp!
Fox is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-10-2008, 09:11 AM   #3 (permalink)
Manager, Alternative Comp
 
Skie's Avatar
 
Join Date: Mar 2003
Location: Chicago burbs
Posts: 2,194
OS: Gentoo Linux, CentOS, OS X

My System

Re: how do i block a file download with .htaccess?

I think the closest you could do is use a Flash based player and have it set to now allow the files to be saved. Beyond that, I'm not aware of anything that .htaccess can do to limit downloading. When a file is "streamed" it's essentially downloaded. The server doesn't know the difference between streaming and right click->save as.
__________________
Skie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-10-2008, 04:45 PM   #4 (permalink)
Registered User
 
Join Date: Apr 2008
Posts: 3
OS: home xp


Re: how do i block a file download with .htaccess?

hmm. could i encrypt the file name aswell?
andrew_u is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-10-2008, 05:16 PM   #5 (permalink)
Manager, Alternative Comp
 
Skie's Avatar
 
Join Date: Mar 2003
Location: Chicago burbs
Posts: 2,194
OS: Gentoo Linux, CentOS, OS X

My System

Re: how do i block a file download with .htaccess?

You'll probably stop 95% of the people, but it's that other 5% that know what they're doing and will get the file no matter what. The only way to truely stop someone is to not provide the files for public access. Even DRM will only work for so long.
__________________
Skie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-11-2008, 05:16 PM   #6 (permalink)
Registered User
 
Join Date: Apr 2008
Posts: 3
OS: home xp


Re: how do i block a file download with .htaccess?

alrighty then.
andrew_u is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-23-2008, 01:05 AM   #7 (permalink)
Registered User
 
Join Date: Apr 2008
Posts: 25
OS: XP Service pack 2


Re: how do i block a file download with .htaccess?

You can only block the IP address from a certain range of country where they access your site. You can add this on your .htaccess file

<Limit GET HEAD POST>
order allow,deny
deny from 192.168.1.1
allow from all
</LIMIT

A usefull code Generator is http://thinkhost.com/services/generators/htblock.shtml
royax is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 11:27 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85