I am attempting to add a header to a number of requested urls i.e. domain/feeds/chicago, domain/feeds/* I understand that this can be achieved by •using mod_rewrite to set an environment variable •using mod_headers to add a header based on the existence of an environment variable. So far I can add the a new header thus Header add RSS_FEED_URL "Akamai-Edge-Control" I'm looking for some pointers as to how to achieve this.
You could try something like: # Untested, but play around with the flags, it may work RewriteRule ^/feeds/([\w\d_-]+)$ /feed.php?name=%1 [PT,QSA,E=akamai:1] Code (markup): That will pass the processing of feed requests to a PHP script called feed.php where you could do a getenv('akamai'), and whatever other checks you need to do. Something like: <?php if (getenv('akamai') == 1) { header("RSS_FEED_URL: Akamai-Edge-Control"); } ?> PHP: