Page 1 of 5 123 ... LastLast
Results 1 to 10 of 44

Thread: .htaccess

  1. #1
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation .htaccess

    Well hello ,

    I have read quite a lot about .htaccess and it's featres but i do not completely understand how to use it...

    If i wanted to put restrictions on user ip address and let the rest of the world be able to view it how would i ?

  2. #2
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I really DON'T mind havin help

  3. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    add the line to the .htaccess with i.p. address, or domain name, or both:

    Code:
    deny from 71.11.141.
    deny from google.com
    Also if you want a completely private folder or file add

    Code:
    Deny from all
    If you are doing this, this really should be all you are having in your .htaccess
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  4. #4
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is that all there is to it ?

    What connects the file itself to the server (is it automatic) and does the htaccess file apply its "script" to anything below it's directory...

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    You will need to place the code that Blizzard posted above in a file named .htaccess (nothing else), and place that in the directory you wish to protect (or limit access to).

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    And yes, that is it. Where ever the .htaccess file is everything below that level will be affected.

    If you want to keep someone off your site all together put it outside the root folder.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes - thanks ,

    But just wondering how do you put the htaccess file above the root ?

  8. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    With most webhosts, your root directory is above your www folder (or public_html, or document root). Simply place the htaccess file above that.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #9
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So what your saying is that i can in my account put a folder called www and before that put the htaccess file...

  10. #10
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    no, the www folder (oftentimes called public_html or just root) should already be there.

    This is the folder that you upload all your web pages and images and crap into that you want everyone to see when they go to youdomain.com.

    through an FTP client or your webhosts admin panel you will be allowed to go one folder up from this directory. place the .htaccess there.

    You can also put it just inside the root folder, but there are some that can bypass it when it is on this level.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

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
  •