Hi!
I have wordpress in its own directory, as described here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
So, my sites are at the domain root, but wordpress is installed in /wordpress.
In this situation, this plugin creates a redirect loop for the main blog (blog #0), since the URL from get_option() will be http://example.org/wordpress but the if-statement in redirect_to_mapped_domain() expects only http://example.org
So, what I did was making sure get_original_url() always returns the protocol + domain name ONLY, by adding this piece of code in get_original_url() directly after $orig_url is set from get_option/get_blog_option:
$orig_url_arr = explode('/', $orig_url);
if (count($orig_url_arr) > 3) {
$orig_url = $orig_url_arr[0] . '//' . $orig_url_arr[2];
}
This is not the most beautiful solution (since the compared URLs will actually not be the correct ones), but it seems to work fine so far.
I'm not sure if this solution will also work if you want your wordpress root to be accessed from http://example.org/blog, but I thought this was a related problem/solution, so att decided to share this here. :)
Thanks for a nice plugin! :)