Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How to do a redirect in IIS6? Using .htaccess? Like:

Order Allow,Deny Deny from all

Is there any way to protect swf files from public users?

share|improve this question
add comment

3 Answers

If you want people to be able to view your SWF as part of their web page you cannot refuse them access to the file. That's the bottom line.

If your problem however is that people are linking to your files from other websites you could use an anti-leeching solution such as this to make sure anyone getting your SWF is coming from your website:

http://anti-leech.versalsoft.com/

Lastly, if you want to disallow them the ability to access any SWF files on your site (meaning they would not be able to download them) simply remove the MIME type from your Virtual Directory.

share|improve this answer
add comment

There's plenty of ways of restricting access in IIS6, by permissions, URL re-writing, ASP redirect scripts, you name it, and it all depends on how you differentiate between "public" and "private" users.

If you want .htaccess style granuality, I strongly suggest ISAPI ReWrite. We use it here and it's brilliant. I believe there's a free version these days as well.

share|improve this answer
add comment

You can also set the permissions on those files to disallow read access for the IUSR_MACHINENAME user account and IIS will prompt for a username and password if someone tries to access them. This would need to be done on a file/folder basis, however. If you just want blanket protection for all .SWF files regardless of where they are then you would need another method as others have laid out.

share|improve this answer
    
This doesn't work actually since the client needs to read the file in order to have access to it. –  ALOToverflow Mar 5 '10 at 14:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.