I have a WordPress multisite installation with a base URL of https://example.com
. Subsites have an initial URL of https://example.com/forinstance
, which can be changed in WordPress to an alias of https://forinstance.com
.
But I want to redirect all URLs from https://example.com/caseinpoint
ALSO to https://forinstance.com
. There's not a way to do that in WordPress, so I'm trying to do it in my .htaccess
file. I can't get it to work though.
I've tried variants of:
RewriteCond %{HTTPS_HOST} ^example.com/caseinpoint$
RewriteRule (.*)$ https://forinstance.com [R=301,L]
But it always just goes to a 404 on example.com.
However, this DOES work for other subsites:
RewriteCond %{HTTPS_HOST} ^ejemplo.com$
RewriteRule (.*)$ https://perinstanza.com [R=301,L]
So it seems to be something to do with the multisite. How can I redirect example.com/forinstance
, please?!