How to construct a rule that checks if the incoming request is of certain terms, if no, then reroute to other URL?
For example, I have a website my.example.com. If the incoming URL is my.example.com/login then it should execute that request. If it's something else (not login), then the request must be reroute to your.example.com. For example,
my.example.com/login2must reroute toyour.example.com/login2my.example.com/nologinmust reroute toyour.example.com/nologinmy.example.com/getnamemust reroute toyour.example.com/getname
And of course, if it's
my.example.com/loginmust reroute tomy.example.com/login
How to use RewriteRule and mod_rewrite to achieve this?