Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-04-2012, 05:22 AM   PM User | #1
mishaola
New to the CF scene

 
Join Date: Jun 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
mishaola is an unknown quantity at this point
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!
mishaola is offline   Reply With Quote
Old 06-04-2012, 02:11 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
Fou-Lu is offline   Reply With Quote
Old 06-14-2012, 05:54 AM   PM User | #3
mishaola
New to the CF scene

 
Join Date: Jun 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
mishaola is an unknown quantity at this point
Thank you for help.
mishaola is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:49 AM.


Advertisement
Log in to turn off these ads.