Results 1 to 4 of 4

Thread: .htaccess Configuration help pls

  1. #1
    Join Date
    Jun 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default .htaccess Configuration help pls

    Hi,

    There is a folder on my website that I wish to protect as it is protected on my website folder below:

    https://ws21.ipowerweb.com/lajollap/cgi-bin/


    It gives you "you are unauthorised to view this page" error. Could any of you kindly guide me as to how I can achieve this.

    Thanks

  2. #2
    Join Date
    Jun 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default .htaccess sample file

    Ok so I've made this .htaccess file from what I learned from this website.

    I have programed it to show a 403 Error upon accessing any of the directories on my website, and I'll be placing this on my root directory
    i.e mydomain.com/.htaccess so that it protects all other directories on the website.

    I've also programmed it for not allowing any hot linking of any of my gif|jpg|js|css content from my site.

    take a look:

    ---------------------------------------------------------------

    ErrorDocument 403 /errors/forbid.html

    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
    RewriteRule \.(gif|jpg|js|css)$ - [F]

    ----------------------------------------------------------------

    Is there anyother code that I need to put on this file before uploading it to take affect.

    thanks

  3. #3
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If you can protect from web admin is better more than .htaccess.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    intinternetmarketing, your grammar is unintelligible, to me at least.

    immi007, no, that should work, but it would have been much easier just to deny read permission to world:
    Code:
    $ chmod w-r cgi-bin
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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