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 Coder TripperTreats's Avatar
    Join Date
    Oct 2006
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .htaccess allow,deny for files

    Hello, why is it that this works in my .htaccess file:
    Code:
    <Files .htaccess>
    order deny,allow
    deny from all
    </Files>
    but none of these work (I've tried them all):
    Code:
    <Files .ini>
    order deny,allow
    deny from all
    </Files>
    
    <Files *.ini>
     order deny,allow
     deny from all
     </Files>
    
    <Files ~ "\.ini$">
     order deny,allow
     deny from all
     </Files>
    
    <Files php.ini>
     order deny,allow
     deny from all
     </Files>
    
    <Files "php.ini">
     order deny,allow
     deny from all
     </Files>
    Psychedelic digital art at www.trippertreats.com.

    "And in the end, the love you take
    is equal to the love you make
    ."

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Hmm you are probably better off preventing hotlinking to the .ini file. I use this
    Code:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://yoursite.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://yoursite.com$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com$      [NC]
    RewriteRule .*\.(ini)$ - [F,NC]
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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