title: .htaccess redirect ~ [fake-subdomain.domain.com/*] to [domain.com/*]
body: <p>I have been searching for this for many hours and I have no idea how to accomplish that. I need to make the following 301 permanent redirect:</p>
  
  <p>When people visit
  <a href="http://web.domain.com.br/something/" rel="nofollow">http://web.domain.com.br/something/</a></p>
  
  <p>They should be redirected to
  <a href="http://domain.com.br/something/" rel="nofollow">http://domain.com.br/something/</a></p>
  
  <p>Where (important!), the <strong>/something/</strong> is not a real directory,
  it is a sub-blog from the wordpress multisite installation.
  There are another rules on the root .htaccess file already in action. They are:</p>
  
  <pre>
  
      RewriteEngine On
      RewriteBase /
      RewriteRule ^index\.php$ - [L]
  
      # uploaded files
      RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
  
      # add a trailing slash to /wp-admin
      RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
  
      RewriteCond %{REQUEST_FILENAME} -f [OR]
      RewriteCond %{REQUEST_FILENAME} -d
      RewriteRule ^ - [L]
      RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
      RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
      RewriteRule . index.php [L]
  
  </pre>
  
  <p>My domain actually already has a some kind of redirect, out of my sight, created by someone on the control panel. They did create the following:</p>
  
  <p>When you visit:
  <strong>http://web.domain.com.br/</strong></p>
  
  <p>You go to:
  <strong>http://domain.com.br/</strong></p>
  
  <p>For the home part, this is ok.
  But whenever I try something like:
  <strong>http://web.domain.com.br/opaopa/</strong></p>
  
  <p>I got redirected to:
  <strong>http://domain.com.br/</strong></p>
  
  <p>AND, if I phisically create inside my root the directory /opaopa/
  the redirect trhows me there... However, I can't create real directories for my wordpress subsites, because the apache gives preference to them, instead of loading the "magic" of the wordpress multisite network.</p>
  
  <p>Sorry if it sounds confusing...
  English is not my natural language.</p>
  
  <p>Thanks sooo much for your attention.
  Regards,
  G.</p>