httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Geilman <>
Subject Re: [users@httpd] Special configuration for requests that do not match any particular virtual host? Apache 2.2
Date Thu, 02 Jun 2011 01:19:29 GMT
On 06/02/2011 01:05 AM, Geoff Millikan wrote:
> I want to make a catch-all virtual host (like the manual mentions below) which redirects
any errant hostnames like
> to our main hostname at   But the
below example doesn't work - I'm getting an
> infinite redirect from right back to
> What am I missing?
> #First virtual host entry
> <VirtualHost *:80>
> 	RewriteEngine On
> 	RewriteRule 	.*{REQUEST_URI} [L,R=301]
> 	ErrorLog 	/var/log/httpd/error_log
> 	CustomLog	/var/log/httpd/access_log combined
> </VirtualHost>



Get rid of all the rewrite junk and just set a dummy servername; this 
will catch ALL undefined hostnames.

Then Redirect / to the correct vhost.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message