I would like to redirect myname.me/a-path to blog.myname.com/this-path/. The directory that serves myname.me also serves myname.com. I do not want myname.com/a-path to redirect to blog.myname.com/this-path/.
I have tried several things with mod_rewrite and most recently have tried the following.
RewriteCond %{HTTP_HOST} ^myname.me$
RewriteRule a-path https://blog.myname.com/this-path/ [L,R=301]
RewriteCond %{HTTP_HOST} ^myname.me$
RewriteCond %{REQUEST_URI} ^/a-path
RewriteRule https://blog.myname.com/this-path/ [L,R=301]
I appreciate any help.
2
Answers
I figured it out!
This is how I redirect to a subdomain within the same host.