[wp-hackers] OT: htaccess and two domains...

Mr. Awesome theone.andonly.mr.awesome at gmail.com
Wed Mar 19 23:05:41 GMT 2008

Aaron Harun wrote:
> If you set them up as "parked" domains, then all you have to do is
> filter all WP calls to the siteurl and blogurl and replace the "set"
> domain with the one the user is currently on.
> add_filter('option_home', 'fix_link',1);
> add_filter('option_siteurl', 'fix_link',1);
> function vfix_lins ($link){
> $url = str_replace(array('www.','./'),'',$_SERVER['HTTP_HOST']);
> 	$link = preg_replace('/(http.*?\:\/\/w*\.*)(.*?)(\/.*)/','${1}'.$url.'${3}',$link);
> return $link;
> }

That sounds good too! Dang, I keep getting these emails late! Where 
would I add the above falling code, if I were to take that route? Two 
separate files, or ... and, will that specific code above work right, or 
how would it need modified in order for it to work?

Or, am I just better off installing WP 2.5 on VB.COM, using a modified 
copy of VB.NET's database (with .net links changed to .com throughout 
it, giving VB.COM an exact copy of .NET currently..) Then using this 
domain-mirror plugin, or 301 htaccess redirects like the other Aaron 
said... ?

More information about the wp-hackers mailing list