Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've got two sites which are hosted on different servers. 1) 2)

I installed a WordPress blog on site one at I want visitors of to be able to access the blog installed on site one via

I have a WordPress plugin called "Domain Theme" that changes the look of the blog depending on the domain the visitor is accessing it from. This plugin determines where the visitor is coming from via the $_SERVER['SERVER_NAME'] variable.

I have an .htaccess file in redirecting requests to Going to actually shows what's at

Unfortunately, the Domain Theme plugin for WordPress can't tell when it's being accessed from because after the rewrite in .htaccess, the value of $_SERVER['SERVER_NAME'] is (not Because of this, I see the same theme when I access the blog from either domain.

Is there a way to redirect requests from that lets the plugin know where they're really coming from?

share|improve this question

migrated from Jul 8 '11 at 19:50

This question came from our site for pro webmasters.

So, why did this question get migrated to WPSE? It's more of a server/htaccess/redirect question. – Chip Bennett Aug 13 '11 at 19:08
Yes and no. It's a question on redirecting, but does involve some deeper knowledge of WP (specifically the Domain Theme plugin) to get it working. – EAMann Nov 13 '11 at 17:22

1 Answer 1

I can think of 2 approaches to try:

  1. You can use a referrer variable within the link such as:

The receiving blog should watch out for the content of the ref variable.

  1. You can just copy into, then access the database of remotely via wp-config.php
share|improve this answer
The first approach is actually the better one because you will still be using just one site. It's pretty trivial to make the plugin look for the referrer variable as well. – EAMann Nov 13 '11 at 17:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.