Forum Topic: Redirects under WordPress Multisite
We have a bunch of WordPress multisite installations and very often we’re converted old Joomla sites to new WordPress sites on these networks. We’ve always done redirects to preserve any existing SEO benefits but have run into a snag with these ..
The basic
Redirect pageurl http://newsite/pagetitle
.. worked fine but blows up when you have the same original page url that now needs to be redirected to the new page on the correct domain.
The Redirect directive does not seem to work if you specific a FQDN in the first part …
So now I changed over to rewriting and tried this (actual):
# Rewrite rules which will only apply to jkleeblackbelt.com
RewriteCond %{HTTP_HOST} ^jkleeblackbelt\.com [nc]
RewriteRule ^form-get-my-child-to-focus.html$http://jkleeblackbelt.com/focus-report-access/ [R=301,NC,L]
(without the wrapping of course..)
Still does not seem to work … so how DO you construct the redirections for this scenario .. I have many old standalone joomla sites with the same page names .. these sites are being moved to WordPress multisite so I need to redirect to the new page name on the correct domain.
thanks,
Jim
3 Replies to “Redirects under WordPress Multisite”
Hi Jim,
It looks like you have the right idea with the redirect, but it looks like there may be a syntax error in the RewriteRule, where the dollar sign “$” should be followed by a space.
It could also be that something else is interfering (e.g., plugin, script, htaccess rules) with the directives, and it could also be related to how MultiSite is set up.
Hopefully that helps. The first thing is to make sure that the .htaccess rules are being applied, then going from there with specific redirects, etc. until things are dialed in.
Let me know how it goes!
Regards,
– Jeff
First version had a space after the $
and didn’t work .. again, redirects themselves worked fine until I had to add the domain name to the requested url. Have already ruled out conflicts with plugins and themes (level 3/4 tech doing mostly php and wordpress troubleshooting). The above came from a reputable WP support group specifically targeting multisite.
The entire .htaccess file I’m trying to get this working on has been stripped all the way back to the default WP specific version and the one rewrite I’m testing (I need to get upwards of 70 up them back up and running with more coming!)
thanks,
Jim
Another thing to try (if you haven’t already) is placing the rewrite rules before any WP rules. I’ve seen cases where certain global variables (such as HTTP_HOST
) aren’t available after processing other rewrites (i.e., WP permalinks). Also reminder to include the blank space after the $
as mentioned.