Im trying to redirect users based on country. Running into a problem negating something.
RewriteEngine on
RewriteCond %{ENV:myvar} !^AU$ [OR]
RewriteCond %{ENV:myvar} !^US$ [OR]
RewriteCond %{ENV:myvar} !^CA$
RewriteRule ^(.*)$ http://www.redirecturl.com [L]
So essentially, what this does is redirect EVERY country except for AU, US and CA. Doesn't seem to work. Shouldn't added the bang (!) negate the reg expression? Or do I have my syntax wrong?
In any way...help!
RewriteEngine on
RewriteCond %{ENV:myvar} !^AU$ [OR]
RewriteCond %{ENV:myvar} !^US$ [OR]
RewriteCond %{ENV:myvar} !^CA$
RewriteRule ^(.*)$ http://www.redirecturl.com [L]
So essentially, what this does is redirect EVERY country except for AU, US and CA. Doesn't seem to work. Shouldn't added the bang (!) negate the reg expression? Or do I have my syntax wrong?
In any way...help!

Comment