I'm using a server which allows me to create and redirect subdomains. However, it is reflected on the address URL bar.
What I want is to keep subdomain.domain.com
as base URL for the subdirectories inside domain.com/subdirectory/
Searching on the internet I always come up with these lines for .htaccess, which I think it does the redirection, but not the masking.
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^sub\.domain\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/sub
RewriteRule ^(.*)$ sub/$1 [L]
edit
Tried this, but didn't work
RewriteEngine on
RewriteBase /subdirectory/
RewriteRule ^(.*)$ http://subdomain.domain.com/$1 [P]
ProxyPassReverse /subdirectory/ http://subdomain.domain.com/