<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot D:/www/www.a.net ServerName www.a.net ServerAlias a.net ServerAlias www.a.net ServerAlias a.net ServerAlias www.a.com ServerAlias a.com ErrorDocument 404 http://www.a.net/error.html SetEnvIfNoCase Referer "^http://www.a.net" local_ref=1 SetEnvIfNoCase Referer "^http://a.net" local_ref=1 SetEnvIfNoCase Referer "^http://www.a.net" local_ref=1 SetEnvIfNoCase Referer "^httpa.net" local_ref=1 <FilesMatch "\.(gif|jpb|png|css|js|swf)"> Order Allow,Deny Allow from env=local_ref </FilesMatch> </VirtualHost>
ServerName www.a.net ServerAlias a.net ServerAlias www.a.net ServerAlias a.net ServerAlias www.a.com ServerAlias a.com 晕,不用写这么多行的,哈哈 ServerAlias www.a.com www.a.net 中间空格就可以了