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

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
LVL 16

Author Comment

ID: 11879835
Looks like RewriteMap do what I need

Accepted Solution

perldog earned 500 total points
ID: 12073960

Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DNS Question 7 69
maven set up 2 171
WAMP server installation, getting error popups, DLLs missing 5 81
More Than One Website On Same DMZ Server 3 85
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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