Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-29-2012, 04:55 PM   PM User | #1
csammy
New to the CF scene

 
Join Date: Jan 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
csammy is an unknown quantity at this point
.htaccess to serve image files only

Is there a way using .htaccess to make sure the files in that directory are only served using a safe content type?

We have an upload script that checks the filesize and the extension of files (make sure they are images), but I understand that a malicious .gif can be uploaded.

Is it possible and would be helpful to have a .htaccess that says files in this directory must only .gif/.jpg/.bmp/ etc...?

Thanks.
csammy is offline   Reply With Quote
Old 05-13-2012, 01:26 PM   PM User | #2
Techyonomics
New Coder

 
Join Date: May 2012
Location: Mars
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Techyonomics is an unknown quantity at this point
to stop php file working put this in your .htacess file

Code:
php_flag engine off
Techyonomics is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 09:50 AM.


Advertisement
Log in to turn off these ads.