Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 4957 invoked from network); 8 May 2009 23:26:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 May 2009 23:26:32 -0000 Received: (qmail 18266 invoked by uid 500); 8 May 2009 23:26:28 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 18227 invoked by uid 500); 8 May 2009 23:26:28 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 18218 invoked by uid 99); 8 May 2009 23:26:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2009 23:26:27 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of icicimov@gmail.com designates 209.85.221.130 as permitted sender) Received: from [209.85.221.130] (HELO mail-qy0-f130.google.com) (209.85.221.130) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2009 23:26:17 +0000 Received: by qyk36 with SMTP id 36so2759681qyk.10 for ; Fri, 08 May 2009 16:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=h13yG0mpF+E+D/B+2g0Z8nZYi3cpJCpZVmIF9BycfvM=; b=Q65XMzXeHbn1RjDbSlcQGDPKgzmnMDndJ7EhTfDo5g/0onWXwvxXh1uWwHYm8RNbWh q+qwYUedhcrYil28Ui9ork/NRxIpovxigjBg9ybOELcVGfyGWXta3R2+eAyTNa2gD5fr sJziGaYO8Vfel7fOluVhEoHJf/tN0LExNqlGo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=kaMSKYCOUJ/2e0UnePaApeoeQhpR+QPvjcT7sMCiXNL5+R9jI6FMIPyBgiFjtXMWwd mFTLjsBMTLP/p7P9X+2I4au18YlfxVAAqJ4JEKvcaFUp61+avKx9hm6EvhFM0LW1S5b/ tvrKM1p+fx2Rx4vYrj9P95CV/EqtzBcrO/Xzw= MIME-Version: 1.0 Received: by 10.220.96.130 with SMTP id h2mr8945097vcn.21.1241825156087; Fri, 08 May 2009 16:25:56 -0700 (PDT) In-Reply-To: <20090508230346.E708D255F28@espphotography.com> References: <4A04B917.8080404@spammotel.com> <20090508230346.E708D255F28@espphotography.com> Date: Sat, 9 May 2009 09:25:56 +1000 Message-ID: From: Igor Cicimov To: users@httpd.apache.org Content-Type: multipart/alternative; boundary=0016e6470ef84d40da04696ef301 X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] conf file: changing domains --0016e6470ef84d40da04696ef301 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Maybe something like this: RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.merill-lynch\.com$ RewriteRule .* http://www.b-of-a.com [R=301,L] or RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.merill-lynch\.com$ Redirect permanent .* http://www.b-of-a.com Cheers, Igor On Sat, May 9, 2009 at 9:03 AM, Evan Platt wrote: > At 03:58 PM 5/8/2009, you wrote: > >> This has probably been asked before, but I'm not sure how to search for it >> in the archives. >> >> I have an Apache server, and a domain name. Now, my domain name changes. >> The web pages content does not change, only the domain. >> >> As an illustrative example, lets say that it used to be >> www.merrill-lynch.com, and is now changing to www.b-of-a.com. >> >> I changed in my Apache conf file, the ServerName from >> ServerName www.merrill-lynch.com:80 >> to >> ServerName www.b-of-a.com:80 >> >> But, when I go to the old domain name, it shows up in the address line of >> the browser. I want the NEW domain name to show there. >> >> I tried changing UseCanonicalName from Off to On, but that made no >> difference. >> >> As another example, you can go to www.lotus.com, they were bought by IBM >> awhile ago. You are jumped to an ibm.com website. >> >> I only have one server, so I can't redirect from one to another. When >> someone goes to my old domain, I want it to look like they are redirected to >> my new one. Is there some way to do this with one Apache server? For extra >> credit, I would like to avoid Virtual Hosts if possible. >> > > I believe mod_rewrite? > http://httpd.apache.org/docs/2.0/misc/rewriteguide.html Never used it, > but I think that would accomplish what you're trying to do.... > > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See for more info. > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > " from the digest: users-digest-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > > --0016e6470ef84d40da04696ef301 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Maybe something like this:

RewriteEngine On
RewriteCond %{HTTP_HO= ST} ^www\.merill-lynch\.com$
RewriteRule .* http://www.b-of-a.com [R=3D301,L]

or

RewriteEngine = On
RewriteCond %{HTTP_HOST} ^www\.merill-lynch\.com$
Redirect permanent .* http://www.b-of-a.c= om

Cheers,

Igor

On Sat,= May 9, 2009 at 9:03 AM, Evan Platt <evan@espphotography.com> wrote:
At 03:58 PM 5/8/2009, you wrote:
This has probably been asked before, but I'm not sure how to search for= it in the archives.

I have an Apache server, and a domain name. Now, my domain name changes. Th= e web pages content does not change, only the domain.

As an illustrative example, lets say that it used to be www.merrill-lynch.com, and is n= ow changing to www.b-of= -a.com.

I changed in my Apache conf file, the ServerName from
ServerName ww= w.merrill-lynch.com:80
to
ServerName www.b-of-= a.com:80

But, when I go to the old domain name, it shows up in the address line of t= he browser. I want the NEW domain name to show there.

I tried changing UseCanonicalName from Off to On, but that made no differen= ce.

As another example, you can go to www.lotus.com, they were bought by IBM awhile ago. You are = jumped to an ibm.com websi= te.

I only have one server, so I can't redirect from one to another. When s= omeone goes to my old domain, I want it to look like they are redirected to= my new one. Is there some way to do this with one Apache server? For extra= credit, I would like to avoid Virtual Hosts if possible.

I believe mod_rewrite? http://httpd.apache.org/docs/2.0/misc/rew= riteguide.html =A0Never used it, but I think that would accomplish what= you're trying to do....



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.<= br> See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
=A0" =A0 from the digest: users-digest-unsubscribe@httpd.apache.o= rg
For additional commands, e-mail: users-help@httpd.apache.org


--0016e6470ef84d40da04696ef301--