Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have 3 different WordPress sites on my host provider in a linux shared hosting package. The main domain is domain-a.com. A secondary add-on domain is domain-b.com. I have a parked domain domain-c.com that redirects to domain-b.com.

All are registered elsewhere and the a-record points to this host provider. Here's the problem: when a user types domain-c.com it properly redirects to domain-b.com. No problem there. The problem occurs when a user types domain-c.com/something.html (anything that is not found on the domain-b.com). It produces my error404 page for domain-a.com, not domain-b.com.

I am told by the host providers (at the registrar and this host) that this is a WordPress issue because of the htaccess file and how WP resolves the domains.

I have tried a plugin named Simple 301 Redirects but it has no effect here.

Any suggestions?

Thanks, Larry

share|improve this question
    
Can you post the contents of the .htaccess file? and do all three domains share a common virtual root? –  toomanyairmiles Mar 9 '11 at 21:52
    
This is the part the host provider says is causing the problem # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress –  Larry4Design Mar 9 '11 at 22:02
    
Also, I am unfamiliar with the term common virtual root. So, I will guess here. It is a shared hosting account. There is one main domain with the account and we can add other add-on domains that are registered elsewhere and parked domains that can be directed to those add-on domains as well. The error page that appears is for the main domain on the account though. I hope that helps. –  Larry4Design Mar 9 '11 at 22:19
add comment

1 Answer

Ok, that's WordPress' standard .htaccess file - because all the sites use a common virtual root (think single folder) all domains are using the .htaccess code. Basically you need to rewrite the code to use separate instructions for each domain e.g. this would send a request for newdomain.com to a specific page.

# Internally rewrite new domain home page requests to a specific page
RewriteCond %{HTTP_HOST} ^www\.newdomain\.com
RewriteRule ^$ /specific-page.html [L] 
share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.