I need a simple solution for chaining Conditions but I end always with errors:
If its not the remote address 123.123.123.123 AND its http host ex.example.com GOTO example.example.com
I came up with this (which doesn't work):
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123$ [C]
RewriteCond %{HTTP_HOST} ^ex\.example\.com$ [NC]
RewriteRule . http://example.example.com%{REQUEST_URI} [R,L]
I thought the [C] flag can manage this but it doesn't. I didn't found any examples on this