Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default protected folder

    By my cpanel I've created a folder to protect by .htaccess, so to store my private documents.
    But zencart (I think the .htaccess on root) don't permit me to see this folder.
    My .htaccess on root is this:
    PHP Code:
    SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots

    SetEnvIfNoCase User
    -Agent "^JoeDog/1.00 [en] (X11; I; Siege 2.65b1)*" block_bad_bots

    SetEnvIfNoCase User
    -Agent "^Yandex/1.01.001*" block_bad_bots

    SetEnvIfNoCase User
    -Agent "^veoh*" block_bad_bots

    SetEnvIfNoCase User
    -Agent "^Java1.4.0_01*" block_bad_bots

    SetEnvIfNoCase User
    -Agent "^Java/1.4.1_04*" block_bad_bots

    <Files *>

    order allow,deny

    Deny from env
    =block_bad_bots

    allow from all

    </Files>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase 
    /

    # From Ultimate SEO URLs
    RewriteRule ^(.*)-p-(.*).htmlindex\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-c-(.*).htmlindex\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-m-([0-9]+).htmlindex\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pi-([0-9]+).htmlindex\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pr-([0-9]+).htmlindex\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pri-([0-9]+).htmlindex\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]


    # For Open Operations Info Manager
    RewriteRule ^(.*)-i-([0-9]+).htmlindex\.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]

    # For dreamscape's News & Articles Manager
    RewriteRule ^news/?$ index\.php?main_page=news&%{QUERY_STRING} [L]
    RewriteRule ^news/rss.xmlindex\.php?main_page=news_rss&%{QUERY_STRING} [L]
    RewriteRule ^news/archive/?$ index\.php?main_page=news_archive&%{QUERY_STRING} [L]
    RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).htmlindex\.php?main_page=news&date=$1-$2-$3&%{QUERY_STRING} [L]
    RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).htmlindex\.php?main_page=news_archive&date=$1-$2&%{QUERY_STRING} [L]
    RewriteRule ^news/(.*)-a-([0-9]+)-comments.htmlindex\.php?main_page=news_comments&article_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^news/(.*)-a-([0-9]+).htmlindex\.php?main_page=news_article&article_id=$2&%{QUERY_STRING} [L]

    # All other pages
    # Don't rewrite real files or directories
    RewriteCond %{REQUEST_FILENAME} !-[NC
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule 
    ^(.*).htmlindex\.php?main_page=$1&%{QUERY_STRING} [L]


    #RewriteCond %{REMOTE_ADDR} ^204.12.77.150 [OR]
    #RewriteCond %{REMOTE_ADDR} ^46.21.144.176 [OR]    
    #RewriteCond %{REMOTE_ADDR} ^74.201.150.111
    #RewriteRule ^(.*)$ http://www.google.com/ [R=301,L]


    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?100asa.it/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^https://(www\.)?100asa.it/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?forum.100asa.it/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?grandufficio.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?openx.100asa.it/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^https://(www\.)?openx.100asa.it/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?notizie.100asa.it/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?pagineprezzi.it/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?hosted.comm100.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?chatserver.comm100.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^https://(www\.)?hosted.comm100.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^https://(www\.)?chatserver.comm100.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?translate.google.com/.*$ [NC]
    RewriteRule .(gif|jpg|swf|flv|png|pdf)$ /feed/ [R=302,L]  
    <
    Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

    <
    IfModule mod_suphp.c>
     
    suPHP_ConfigPath /home/centoasa
     
    <Files php.ini>
       
    order allow,deny
       deny from all
     
    </Files>
    </
    IfModule
    and the .htaccess on protected folder "condivisione" is:
    PHP Code:
    AuthType Basic
    AuthName 
    "condivisione"
    AuthUserFile "/home/centoasa/.htpasswds/public_html/condivisione/passwd"
    require valid-user 
    When I try to recall www.100asa.it/condivisione, I've the zencart "page not found"

  2. #2
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: protected folder

    There a few different ways you can password protect and I always suggest the Hoster as the first person to discuss it with. They know their Server setup and how it applies to your Hosting account, better than anyone.

  3. #3
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default Re: protected folder

    Did you get this to work? Its to do with this line:

    HTML Code:
    RewriteCond %{REQUEST_FILENAME} !-f [NC]  
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]
    If you remove the last line above it works OK. Adding in a line to ignore the folder does not work.

    So I think its a Zencart issue that is preventing password protection of folders working.

 

 

Similar Threads

  1. Protected user specific folder
    By hoehnt in forum General Questions
    Replies: 6
    Last Post: 12 Jan 2010, 01:32 AM
  2. Setup a folder in root for protected videos
    By dgsignal in forum General Questions
    Replies: 3
    Last Post: 8 Jan 2009, 03:37 PM
  3. PassWord Protected
    By zurbs in forum Customization from the Admin
    Replies: 1
    Last Post: 11 Sep 2008, 09:45 PM
  4. Password Protected Categories
    By shonny in forum General Questions
    Replies: 5
    Last Post: 11 Jan 2008, 08:45 AM
  5. Protected downloads
    By stbede77 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 29 Sep 2006, 10:48 AM

Posting Permissions

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