|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
|
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
"Oleksii Krykun" <krikun@academy.kiev.ua.nospam> wrote in message news:1151171446.590764@eph1.academy.kiev.ua... > I need to redirect from one WWW server to another in such way: > http://www1.my.org/dir1 -> http://www2.my.org/ > > my .htaccess in dir1 are following: > > RewriteEngine On > RewriteRule (.*) http://www2.my.org/$1 [P] > > All works fine for first level directory on www2, i.e. if I type > http://www1.my.org/dir1/ I can see http://www2.my.org/index.html > But I receive e.g. http://www1.my.org/dir2 instead > http://www2.my.org/dir2. But I suppose http://www1.my.org/dir1/dir2. > > Where is my mistake? Let me get your problem correctly. You have .htaccess in dir1 on www1.my.org/. Now you are trying to browse dir2 on same server and your rewrite is not working(menaing you are not getting www2.my.org/dir2). Right? If so, it is correct because you have .htaccess in dir1, menaing only applies to directory dir1 and below sub-directories. or do mean you get www1.my.org/dir1/dir2? if so you have some other redirect. However if you want all the request to dir1 and below to be redirected to www2.my.ord/ server(with the same path), try these, RewriteEngine on RewriteBase / RewriteRule ^dir1(.*) http://www2.my.org$1 [L,R,P] regards Holla |
|
![]() |
| Outils de la discussion | |
|
|