You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by kp_stv <DX...@spammotel.com> on 2009/05/12 00:47:42 UTC

[users@httpd] Re: conf file: changing domains

I tried Matus suggestion:
Redirect permanent / http://www.b-of-a.com/
but it does not work, unless it matches exactly.
In other words, http://www.olddomain.com/ is replaced by 
http://www.newdomain.com/ as desired, but 
http://www.olddomain.com/about.html (or anything else after the domain 
name) stays as the same.
This seems unlike the documentation says it should behave.
I have 2.0.55 (Win32) Apache, I hope that doesn't matter.

On 11.05.09 01:54, Matus UHLAR - fantomas wrote:
 >> On 09.05.09 09:33, Igor Cicimov wrote:
 >> Ups, this directive (and just that one):
 >>
 >> Redirect permanent .* http://www.b-of-a.com
 >
 >shouldn't it better be:
 >
 >Redirect permanent / http://www.b-of-a.com/
 >
 >? The former causes "forgetting" the path.
 >
 >> should be used in the VirtualHost section for the old domain.
 >
 >yes, this needs separate vhost.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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


Re: [users@httpd] Re: conf file: changing domains

Posted by Igor Cicimov <ic...@gmail.com>.
Did you try my first suggestion? If it didn't work try this one

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.merill-lynch\.com$
RewriteRule ^/(.*) http://www.b-of-a.com/$1 [R=301,L]

Igor

On Tue, May 12, 2009 at 8:47 AM, kp_stv <DX...@spammotel.com> wrote:

> I tried Matus suggestion:
> Redirect permanent / http://www.b-of-a.com/
> but it does not work, unless it matches exactly.
> In other words, http://www.olddomain.com/ is replaced by
> http://www.newdomain.com/ as desired, but
> http://www.olddomain.com/about.html (or anything else after the domain
> name) stays as the same.
> This seems unlike the documentation says it should behave.
> I have 2.0.55 (Win32) Apache, I hope that doesn't matter.
>
> On 11.05.09 01:54, Matus UHLAR - fantomas wrote:
> >> On 09.05.09 09:33, Igor Cicimov wrote:
> >> Ups, this directive (and just that one):
> >>
> >> Redirect permanent .* http://www.b-of-a.com
> >
> >shouldn't it better be:
> >
> >Redirect permanent / http://www.b-of-a.com/
> >
> >? The former causes "forgetting" the path.
> >
> >> should be used in the VirtualHost section for the old domain.
> >
> >yes, this needs separate vhost.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> 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
>
>

Re: [users@httpd] Re: conf file: changing domains

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 11.05.09 15:47, kp_stv wrote:
> I tried Matus suggestion:
> Redirect permanent / http://www.b-of-a.com/
> but it does not work, unless it matches exactly.
> In other words, http://www.olddomain.com/ is replaced by  
> http://www.newdomain.com/ as desired, but  
> http://www.olddomain.com/about.html (or anything else after the domain  
> name) stays as the same.

Do you mean it does not redirect, or it redirects
http://www.olddomain.com/about.html to http://www.newdomain.com/about.html ?
It should do the latter and I think that's desired effect, isn't it?
If not, the

RedirectMatch /.* http://www.newdomain.com/

should redirect _anything_ to www.newdomain.com title page.

> This seems unlike the documentation says it should behave.
> I have 2.0.55 (Win32) Apache, I hope that doesn't matter.

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I feel like I'm diagonally parked in a parallel universe. 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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