title: Redirecting a New Domain to Existing Subdirectory with WP Installation
body: <p>after searching for a while I couldn't figure out how to solve this issue:</p>
  
  <p>I have a client's website, say: client.com, which I am hosting as part of the company's website, company.com.</p>
  
  <p>Client.com is currently permanently redirected to company.com.</p>
  
  <p>I installed a wordpress site on company.com/client, and want client.com to point to the /client subdirectory, but keep client.com in the URL.</p>
  
  <p>I was able to do this, but when I click one of the links on the client's website, like "About Us," it shows the new page, but stays at client.com instead of client.com/aboutus.</p>
  
  <p>How can I make this happen? As in, how can I make the URL dynamic?</p>
  
  <p>In the root directory of company.com I have the following .htaccess:</p>
  
  <blockquote>
  <pre><code>RewriteEngine On
  RewriteCond %{HTTP_HOST} ^(www.)?client.com/$
  RewriteRule ^(.*)$ /client%{REQUEST_URI} [NC,L]
  RewriteRule ^((?!client).*) /client%{REQUEST_URI} [L,NC]
  </code></pre>
  </blockquote>
  
  <p>In the /client directory I have just the WP installed .htaccess:</p>
  
  <blockquote>
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  </blockquote>