Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .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.

  • #2
    New Coder
    Join Date
    May 2012
    Location
    Mars
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    to stop php file working put this in your .htacess file

    Code:
    php_flag engine off


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •