|

WordPress Multisite, Multiple Root Domains, htaccess

Sometimes those who know how things like a .htaccess file works fail to mention really simple things. So I’m going to mention this one.

I have a site with multiple domain names that I want to consolidate. Thus I’m creating a single site, but because of numerous existing links, I want the domain names to all point to the same site. Eventually we’ll use only one–that’s what consolidation is about!

Thus I was trying to add a wildcard redirection for two domain names (energion.info, energion.com) to the new domain name energion.co. I had my multisite working, and then I added a couple of redirects via cpanel.

Not so much with the working.

So I looked at the .htaccess file. The redirects are added after the existing WordPress code. Simply moving the redirection above the domain redirects above the WordPress code makes everything work perfectly. This is logical. So logical, in fact, that I should have thought of it before I hit cpanel, and I’m no great Apache expert.

But I didn’t think of it, and it occurs to me that someone else might also fail to think of it. Thus this post.

Similar Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.