[HELP] How to allow certain folder

Discussion in 'Apache' started by proxywhereabouts, Sep 15, 2009.

  1. #1
    On my site, rsmaker.com I have a htaccess like this:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^rsmaker\.com [NC]
    RewriteRule ^(.*)$ http://www.rsmaker.com/$1 [R=301]
    
    order deny,allow
    
    
    <Files ~ "\.(php|php.*|sphp|php3|php4|php5|phtml|cgi|pl|shtml|dhtml|html|htm|lst)$">
    deny from all
    </files>
    
    <files index.php>
    allow from all
    </files>
    
    <files stats.php>
    allow from all
    </files>
    
    <files privacy.php>
    allow from all
    </files>
    
    <files disclaimer.php>
    allow from all
    </files>
    
    <files tos.php>
    allow from all
    </files>
    
    <files faq.php>
    allow from all
    </files>
    
    <files advertise.php>
    allow from all
    </files>
    
    <files yshout.php>
    allow from all
    </files>
    
    <files example.html>
    allow from all
    </files>
    
    <files bar.php>
    allow from all
    </files>
    
    <files 404.shtml>
    allow from all
    </files>
    
    <files 403.shtml>
    allow from all
    </files>
    
    <files upload.php>
    allow from all
    </files>
    
    <files cron.php>
    allow from all
    </files>
    
    <files js.php>
    allow from all
    </files>
    
    <files ~ "^\.">
    deny from all
    </files>
    
    ErrorDocument 400 /400.shtml
    ErrorDocument 401 /401.shtml
    ErrorDocument 403 /403.shtml
    ErrorDocument 404 /404.shtml
    ErrorDocument 500 /500.shtml
    ErrorDocument 503 /503.shtml
    Options All -Indexes
    
    Code (markup):

    I recently installed a forum on the site and now want to allow access to the forum but I don't know how to do it. So, everytime people want to do anything on the forum (www.rsmaker.com/forums), it will show no access.

    So, how do I allow /forums/ access?
     
    proxywhereabouts, Sep 15, 2009 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    Umm why do u add this code ??

    <Files ~ "\.(php|php.*|sphp|php3|php4|php5|phtml|cgi|pl|shtml|dhtml|html|htm|lst)$">
    deny from all
    </files>


    Remove that and all that should go
     
    Bohra, Sep 15, 2009 IP
  3. proxywhereabouts

    proxywhereabouts Notable Member

    Messages:
    4,027
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    200
    #3

    That is the htaccess supplied by the script I use to prevent someone from phising the account in have in the script. I need only to exclude /forum/ from this rule .
     
    proxywhereabouts, Sep 15, 2009 IP
  4. proxywhereabouts

    proxywhereabouts Notable Member

    Messages:
    4,027
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    200
    #4
    I could've go with
    <files ~ "\.php$">
    allow from all
    </files>
    Code (markup):
    buta that would be risky as it's exposed wide to hackers. So, the solution that I came up with was by installing forum in another subdomain account.
     
    proxywhereabouts, Sep 15, 2009 IP
  5. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    the alternative is to put another htaccess inside the forums/ folder and in put there:

    <files *>allow from all</files>
    Code (markup):
    but in any case it's generally 'safer' to have the forum on another subdomain and probably more practical.
     
    szalinski, Mar 16, 2010 IP