I want to mask my subdomain to a specific url on my main domain using .htaccess.
For example: https://sub.example.com to show the content of https://www.example.com/page/12345. And the URL is still https://sub.example.com
I have got the following in .htaccess:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^sub\.example\.com
RewriteRule ^https://sub\.example\.com https://www\.example\.com/page/12345
But if I go to https://sub.example.com, it shows content of https://www.example.com. Can't seem to figure out what's wrong. Please help!