httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Millikan" <gmilli...@t1shopper.com>
Subject RE: [users@httpd] Special configuration for requests that do not match any particular virtual host? Apache 2.2
Date Thu, 02 Jun 2011 02:06:24 GMT
> 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.

Yep, we tried something like this (see below) and it crashed Apache even though the syntax
is correct.

<VirtualHost *:80>
      #virtual host entry #1
</VirtualHost>

<VirtualHost *:80>
      #virtual host entry #2
</VirtualHost>

<VirtualHost *:80>
	#very last virtual host entry #934
	ServerName     t1shopper-catch-all.com
	ServerAlias    *
	RewriteEngine On
	RewriteRule 	.* http://www.t1shopper.com%{REQUEST_URI} [L,R=301]
</VirtualHost>


---------------------------------------------------------------------
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


Mime
View raw message