On Thu, 29 Aug 2002, Abd El-Hamid Mohammed wrote: > Anybody can tell me how to redirect > http://www.mydomain.com/abc To http://abc.mydomain.com:8080 > > I had used the following > > RewriteEngine on > RewriteRule ^/abc(.*) http://abc.use-trade.com:8080$1 [P] > ProxyPass /abc/ http://abc.use-trade.com:8080/ > ProxyPassReverse /abc/ http://abc.use-trade.com:8080/ > > and it works great for redirecting http://www.mydomain.com/abc/ > but it fails with http://www.mydomain.com/abc "without the trailing slash" > as the first page is the only page that displays correctly, Any link in it > is prefixed with http://www.mydomain.com/ which is wrong as it should be > http://www.mydomain.com/abc/ > > Can anyone tells me how to solve it.
You can add RewriteRule ^/abc$ http://abc.use-trade.com/abc/ [R] to send redirect to browser from /abc to /abc/ as mod_dir does for any directory without trailing slash. BTW, mod_accel send such redirection automatically, i.e if you have AccelPass /one/ http://backend/two/ then if browser ask /one it will get redirect to /one/. Igor Sysoev http://sysoev.ru