Here's what I'm trying to do.
When you type admin.example.com I want users to be redirected to example.com/admin/ but I would like the url in the address bar to remain admin.example.com if possible.
I searched some solution for that but not working :
RewriteEngine on
RewriteCond %{HTTP_HOST} ^admin\.example\.com$
RewriteRule ^ http://example.com/admin%{REQUEST_URI} [L,P]
This also not work ... Is there any other setting in domain control panel ?
Just enable mod_proxy in apache and then in the virtual host enter the following and restart apache.
ProxyPass / http://example.com/admin/ ProxyPassReverse / http://example.com/admin/