Solved

Dynamic values for Apache conditions

Posted on 2004-08-23
2
242 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Employ management and Helpdesk software 4 42
How to redirect https://www to non-www? 6 75
Trying to connect the LDAP over SSL 38 287
Apache Issues 9 80
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…
As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 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