www.webdeveloper.com
Results 1 to 3 of 3

Thread: .htaccess issue

  1. #1
    Join Date
    Jul 2005
    Location
    faisalabad, punjab, pakistan
    Posts
    241

    .htaccess issue

    hi, i want to create a htaccess rule for not downloading zip files from my domain in specific directory...

    www.abc.domain.com/dzfiles

    i have this rule and it works but also it denied any request to any directory in this domain....

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?abc.domain\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*\.(zip)$ - [F]

    the question is how can i prevent my zip files only in one directory....

  2. #2
    Join Date
    Oct 2009
    Location
    Michigan
    Posts
    19
    Have you tried creating a .htaccess file within the directory with the zip files with something like this in it:

    Code:
    RewriteEngine On
    RewriteRule .*\.(zip)$ - [F]

  3. #3
    Join Date
    Jul 2005
    Location
    faisalabad, punjab, pakistan
    Posts
    241
    thank you weenis, it works...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles