I have a Wordpress multisite and I'm trying to direct everything from one of the sites to a completely different domain. Of the examples I've tried below, none of the redirects seem to do anything.
Options +FollowSymlinks
RewriteEngine on
#attempt one
Redirect 301 ^/multisite-one/.*$ http://newdomain.com/
#attempt two
RewriteRule ^multisite-one/$ http://newdomain.com/ [L,R=301]
#attempt three
RewriteCond %{REQUEST_URI} ^/multisite-one/(.*)$
RewriteRule ^(.*) http://newdomain.com/%1 [R=301,NC]
#attempt four
RewriteCond %{HTTP_HOST} ^multisite-one/$ [NC]
RewriteRule ^(.*)$ http://newdomain.com/ [R=301,L]
#BEGIN Wordpress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#END Wordpress
A little bit about my setup:
- The multi site is set up as having 2 homepages, one for multisite-one, another for multisite-two. There is no top level index page.
- The multisites share page templates. The two sites are structured the same, they just contain different content (i.e. multisite-one is customer service, multisite-two is how-tos)
What I'm looking to accomplish:
http://mainsite.com/multisite-one/ redirects to http://newdomain.com/
http://mainsite.com/multisite-one/page2 redirects to http://newdomain.com/
http://mainsite.com/multisite-one/page8/pies redirects to http://newdomain.com/
http://mainsite.com/multisite-two/ does not redirect
http://mainsite.com/multisite-two/page2 does not redirect
http://mainsite.com/multisite-two/page8/tacos does not redirect
I've tried adding the above redirects within the Wordpress code as stated in this similar question. I've also tried all of these that seem relevant.
Note: I cannot use plugins because they are currently disabled and I do not have FTP access. I have to make these updates using the linux command line. Obviously this is a terrible situation.