Solved

Dynamic values for Apache conditions

Posted on 2004-08-23
2
240 Views
Last Modified: 2009-12-16
Hello.


The following can be used with mod_rewrite to block all users except ones with a cookie called "5hf0w7fb4jf7"

       RewriteCond %{HTTP_cookie} !^5hf0w7fb4jf7

Because the cookie name changes, I need to something dynamic in the place of "5hf0w7fb4jf7" like:

       RewriteCond %{HTTP_cookie} !%{_Value_From_A_Database_Feild_}
or
       RewriteCond %{HTTP_cookie} !%{_Value_of_a_file_called_access_}
or
       RewriteCond %{HTTP_cookie} !%{_any_other_dynamic_sorce_}

Can I call a dynamic value from somewhere in a condition?

Thanks!
0
Comment
Question by:hankknight
2 Comments
 
LVL 16

Author Comment

by:hankknight
ID: 11879835
Looks like RewriteMap do what I need
0
 
LVL 2

Accepted Solution

by:
perldog earned 500 total points
ID: 12073960
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now