Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Aug 2005
    Posts
    58

    Default Limit File Types

    Is there a way to limit file types in an addon domain folder?

    Or some way to limit file types through htacess or anything like that?

    Say I want to give a folder on a domain to someone to use and access via ftp, but they can only use it for html and css files and files under a certain size limit.

    Anybody know if this is possible and how?

  2. #2
    Member
    Join Date
    May 2008
    Posts
    1,114

    Default

    I do not think it will be possible to limit the file size for particular folder. However, you can try below code in .htaccess to limit file types for uploading.

    RewriteEngine On
    RewriteCond %{REQUEST_URI} foldername/
    RewriteCond %{REQUEST_URI} !\.(ext1|ext2|ext3|ext4|ext5)$ [NC]
    RewriteRule .* error-page.html [L]

    Note: Replace ext1, ext2..etc with the types of extensions you wish to disallow.

Similar Threads & Tags
Similar threads

  1. awstats file types 3 images missing
    By outlaw web in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-16-2009, 01:34 PM
  2. Certain types of zip files in file manager (X)
    By SMG in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-10-2008, 11:13 AM
  3. Prioritizing index file types
    By wyrmmage in forum New User Questions
    Replies: 2
    Last Post: 03-19-2008, 10:59 PM
  4. Restrict File Types on Subdomains
    By Avtar9 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-11-2004, 05:14 AM
  5. file sizes and file types
    By energiserve in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-16-2003, 05:11 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube