0
votes

I am trying to create an apache redirect rule that will redirect half of my traffic to one location.

The way I want to do this is by only redirecting traffic that arrives with an even timestamp. What is the best way to do this?

1
can you please provide more details, like URLs, destination. this will make our answers as accurate as possible - EscoMaji

1 Answers

4
votes

Not sure if it's a smart ting to do, but you could do something like this:

RewriteEngine On
RewriteCond %{TIME_SEC} \d[0,2,4,6,8]
RewriteRule ^(.*) http://other.server.net/$1 [R=301,QSA,L]

Edit: Changed from DATE_LOCAL to TIME_SEC. Which made the regular expression better