You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Doug Strick <do...@gmail.com> on 2015/01/26 18:48:11 UTC

[users@httpd] Multiple domains in variable for "SetEnvIf Referer"

I have a rewrite where we'll be creating a cookie if you're being
redirected from a few specific domains.  Is there a way I can use one
variable to handle multiple domains or does the rewrite block need to be
repeated based on the domain?  I'd like one block to be able to be directed
to handle 3-4 specific domains.  Thanks

SetEnvIf Referer test.com OLD_REFERER=$1
RewriteCond %{HTTP_REFERER} test.com [NC]
RewriteRule ^ - [CO=LEGACY:%{ENV:OLD_REFERER}:.example.com:1440:/]