Dynamic values for Apache conditions

Posted on 2004-08-23
Last Modified: 2009-12-16

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_}
       RewriteCond %{HTTP_cookie} !%{_Value_of_a_file_called_access_}
       RewriteCond %{HTTP_cookie} !%{_any_other_dynamic_sorce_}

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

Question by:hankknight
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 16

Author Comment

ID: 11879835
Looks like RewriteMap do what I need

Accepted Solution

perldog earned 500 total points
ID: 12073960

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

734 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