[二级域名]APACHE的怎么不起作用?[已解决]

[二级域名]APACHE的怎么不起作用?[已解决]

配置文件

[Copy to clipboard] [ - ]
CODE:
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteMap vhost txt:E:\LAMP\apache2\conf\vhost.map
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/$1

vhost.map内容

[Copy to clipboard] [ - ]
CODE:
www.test.net E:\LAMP\web
bbs.test.net E:\LAMP\web\bbs

怎么bbs.test.net 和ww.test.net 都转到同一个地方去了?

把重写日志打开,看看你那一步错了。
#Add by david 2006-12-13
NameVirtualHost 59.36.181.8

<VirtualHost 59.36.181.8>
DocumentRoot E:\LAMP\web
ServerName www.test.net
</VirtualHost>

<VirtualHost 59.36.181.8>
DocumentRoot E:\LAMP\web\bbs
ServerName  bbs.test.net
</VirtualHost>

这个在IE下可以,
可在firefox里第一个地址就狂闪不停
在官方文档中查了一段时间。开心
贴出解决方案:
DOCUMENTROOT E:\LAMP\WEB
#Add by david 2006-12-13
NameVirtualHost 192.192.192.3:80

<VirtualHost 192.192.192.3:80>
ServerName www.test.net
DocumentRoot E:\LAMP\web\www
ErrorLog E:\LAMP\apache2\logs\www.test.net-error_log
TransferLog E:\LAMP\apache2\logs\www.test.net-access_log
</VirtualHost>

<VirtualHost 192.192.192.3:80>
ServerName bbs.test.net
DocumentRoot E:\LAMP\web\bbs
ErrorLog E:\LAMP\apache2\logs\bbs.test.net-error_log
TransferLog E:\LAMP\apache2\logs\bbs.test.net-access_log
</VirtualHost>