What should go into the htaccess to get IP Canonicalization to work for all subsites automatically?

Hey folks,

What should go into the htaccess to get IP Canonicalization (C.) to work for all subsites automatically?

This is to be distinguished from the URL Canocialization. The URL C. is done in the DNS records of each domain.

However, the IP C. needs to be set in the htacesss (as I understand it anyhow)...smile.

I have gotten it to work fine on the main (primary) domain for the multisite using this:
RewriteEngine On (put immediately under)
RewriteCond %{HTTP_HOST} ^111\.11\.111\.11
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]

***ip address replaces 1's and correct domain name.

But, my question is:

What alternate htacess code should be put in to automatically enable IP C. tests to pass on all current subsites and also future subsites that are added to the multisite network?

:slight_smile:

Greg