Redirect www.mysite.com/monitor to x.x.x.x/monitor with masking?

I finally got folder.mysite.com redirects to x.x.x.x/folder, but now the user wants www.mysite.com/folder redirects to x.x.x.x.x/folder.

Can you help me?

I have tried to do it using .htacces inside wordpress, but I can’t.

This is my wordpress .htaccess:

# 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] RewriteCond %{HTTP_HOST} ^ RewriteRule ^(.*) http:// [P] </IfModule> # END WordPress 

Thanks!