On Tue, Apr 2, 2013 at 5:18 PM, Thibaut Lemaire <tib1avivo@xxxxxxxxx> wrote: > Hi, > > I want to use Apache to proxy requests like domain.tld.MyDomain.tld to > domain.tld. > > I've tried this : > > <VirtualHost *:80> > RewriteEngine on > RewriteCond %{HTTP_HOST} (.*).MyDomain.tld$ > RewriteRule (.*).MyDomain.tld$ $1 > ProxyPassMatch /http://$1/ > </VirtualHost> > If you have a matching group in a RewriteCond, the match is available in %N, not $N. Capture in RewriteCond => %N Capture in RewriteRule => $N However, you can't use rewrite and mod_proxy like that. What you can do is to use RewriteRule/Cond to generate a URL, and ask apache to proxy to that URL by giving the RewriteRule a [P] flag (ie, no ProxyPassMatch). I'm still not sure what you are trying to do though. Do you mean proxy - you want to connect to a different server, fetch that content over the network to this server, and then deliver it to the client? Or do you want an internal rewrite - ask apache to internally request this content from a different vhost hosted by this apache server? Cheers Tom --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx