I need to proxy the URL http://de.domain.com/article1/foobar/ to http://de.foobar.domain.com/article1/.
How can I do this within getting and setting the subdomain language part?
Examples:
http://de.domain.com/article1/foobar/ => http://de.foobar.domain.com/article1/
http://dk.domain.com/article1/foobar/ => http://dk.foobar.domain.com/article1/
http://en.domain.com/article1/foobar/ => http://en.foobar.domain.com/article1/
http://el.domain.com/article1/foobar/ => http://el.foobar.domain.com/article1/
I heard this is not possible only with mod_proxy and I have to use mod_rewrite for this. But I don't know how. Maybe someone can post an example?
Redirecting is no option.