.htaccess redirect ~ [fake-subdomain.domain.com/*] to [domain.com/*]


Staff member
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:

When people visit
<a href="http://web.domain.com.br/something/" rel="nofollow">http://web.domain.com.br/something/</a>

They should be redirected to
<a href="http://domain.com.br/something/" rel="nofollow">http://domain.com.br/something/</a>

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:

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]

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:

When you visit:

You go to:

For the home part, this is ok.
But whenever I try something like:

I got redirected to:

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.

Sorry if it sounds confusing...
English is not my natural language.

Thanks sooo much for your attention.