I'm not an expert on mod_rewrite, but one thing that Jumped out at me is you're using {REMOTE_HOST} when I think you should be using {HTTP_HOST}. I believe {REMOTE_HOST} refers to the host name of the browsing client, not the server host. There's a good cheat sheet at http://www.ilovejackdaniels.com/cheat-sheets/mod_rewrite-cheat-sheet/ that includes an example similar to what you're attempting. Good luck! -Derek > -----Original Message----- > From: php-objects@xxxxxxxxxxxxxxx > [mailto:php-objects@xxxxxxxxxxxxxxx] On Behalf Of Andres Santos > Sent: Thursday, November 24, 2005 7:24 AM > To: php-objects@xxxxxxxxxxxxxxx > Subject: php and htaccess > > > Hi... > i know this URL Rewriting Guide stuff isnt PHP per se, but since all > (good) php developers run their apps on Apache Webservers, its worth > asking for: > > How can I redirect all incoming traffic from www.server1.com to > www.server2.com with htaccess rewrite's conditions and rules? the > catch is that it also has to work with urls like > www.server1.com/about_us/ » www.server2.com/about_us/ .....etc > > I tried this block of code here (found on > http://httpd.apache.org/docs/2.0/misc/rewriteguide.html), but didnt do > the trick: > RewriteCond %{REMOTE_HOST} !^.+\.from-here\.com$ > RewriteRule ^(/~.+) http://www.to-here.com/$1 [R,L] > > Im really desperate to find a solution. > > Thanks, > IIG Andres Santos > Móvil » (593) 9 7026627 > > > ------------------------ Yahoo! Groups Sponsor > --------------------~--> > Get fast access to your favorite Yahoo! Groups. Make Yahoo! > your home page > http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM > -------------------------------------------------------------- > ------~-> > > PHP Data object relational mapping generator - > http://www.meta-language.net/ > Yahoo! Groups Links > > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> 1.2 million kids a year are victims of human trafficking. Stop slavery. http://us.click.yahoo.com/WpTY2A/izNLAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> PHP Data object relational mapping generator - http://www.meta-language.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/