Results 1 to 2 of 2

Thread: Need .htaccess code to restrict IP from only one file

  1. #1
    vectro's Avatar
    vectro is online now I Like Stuff
    Join Date
    Dec 2008
    Location
    U.S.A.
    Posts
    625
    Thanks
    192
    Thanked 100 Times in 79 Posts

    Need .htaccess code to restrict IP from only one file

    I need .htaccess code that will:

    Restrict a specific IP from a specific page.
    Allow that IP on any other pages but the restricted one.

    I already tried this and it does not work:

    Code:
    <Files submit.php>
    Order Allow,Deny
    deny from 1.2.3.
    deny from 1.2.
    allow from all
    </Files>
    Does anyone know a better way, maybe using mod_rewrite?

  2. #2
    vectro's Avatar
    vectro is online now I Like Stuff
    Join Date
    Dec 2008
    Location
    U.S.A.
    Posts
    625
    Thanks
    192
    Thanked 100 Times in 79 Posts
    After rebuilding Apache, the code I posted in the first place started working. No problem now.

Tags for this Thread

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
  •