I'm trying to set up a 301 redirect from a subdomain to a subfolder, but nothing I do seems to work. The goal is to set up a redirect from the subdomain "learn", to a subdirectory "learn".
learn.site-name.com -> site-name.com/learn
I have not been able to successfully set this up on our (kinsta) staging site. learn.site-name.com just goes straight to site-name.com.
What am I doing wrong??
Here is the .htaccess (site name obscured for client's privacy):
php_value upload_max_filesize 12M
php_value post_max_size 13M
RewriteEngine On
RewriteCond %{HTTP_HOST} ^learn\.XXXX.kinsta\.com$ [NC]
RewriteRule ^(.*)$ http://XXXX.kinsta.com/learn/$1 [L,R=301]