I will put it as simple as I can. I really need your help, so one of the domains let's say example1.com is set to point to real_domain.com, basically what happens is when you type into your browser example1.com it will redirect you to real_domain.com.
So basically I need and if that is even possible. I would like to write htaccess file on the real_domain.com so that according to different requested URL points it to certain subdomain, let say if you type in your browser example1.com it should bring you to real_domain.com/es.
My question is if that is even possible to do and if so HOW TO DO IT, I tried something like this but it didn't happen:
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.real_domain.com/es [L,R=301]
Is that even a right approach? Can this be done, if so, every help is very much appreciated. Sorry if the topic is already somewhere I tried it but didn't found it.
P.S. I don't have access to example.com htaccess file it just redirected to real_domain.com I assume with moniker.com.
Thank you in advance for the help.