Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to use "if statements" in .htaccess with class ip address?

    Hi everyone. Please help me, How to use "if statements" in .htaccess with class ip address?
    Example: I have class ip:
    Code:
    1.52.0.0/14
    14.0.16.0/20
    14.160.0.0/11
    14.224.0.0/11
    27.0.12.0/22
    Now I want use "if statements" in .htaccess to detect users, if any "ip user" in class ip that then Define new variable and use new variable that in my code php.
    - Please help me. Thank you so much!

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,980
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Here's a quick little rundown: http://www.askapache.com/htaccess/ap...-htaccess.html

    Use SetEnvIf syntax and define an environment variable. Retrieve it in PHP's $_ENV.

  • #3
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you for help.


  •  

    Posting Permissions

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