Link to home
Start Free TrialLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

Making scripts NON EXECUTABLE with .htaccess

Hello,

How are you?

I have a directory on my website that I need to make available for public FTP uploads / downloads.  I do NOT want anything in that directory to be executable.

.PHP, .pl, cgi  and .sh SHOULD ALL be treated as plain text.

Is there something I can put in my .htaccess file to secure this directory?

Thanks!
Avatar of Robin Hickmott
Robin Hickmott

php_admin_flag engine off
Sorry that should be

php_value engine off
AddType text/plain .html .htm .shtml .php
Avatar of hankknight

ASKER

Thanks!

So something like this then:

       php_value engine off
       AddType text/plain .html .htm .shtml .php .sh .cgi .pl .c

But, I could be missing something so is there a way to set EVERTHING except:
       .png
       .gif
       .jpg
       .psd
       .tif
       .ai
       .pdf
       .eps

To text/plain ?
ASKER CERTIFIED SOLUTION
Avatar of Robin Hickmott
Robin Hickmott

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial