<VirtualHost *:80>
ServerName www.111cn.net
JkMountFile conf/uriworkermap.properties
</VirtualHost>
<VirtualHost *:80>
ServerName mail.abc.com
ServerAlias *.111cn.net 111cn.net*.abc.com.cn abc.com.cn
RewriteEngine On
RewriteRule ^(.+) http://www.111cn.net [R=307]
</VirtualHost>
再提供一种方法
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteMap vhost txt:/usr/local/etc/apache/vhost.map
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/$1
php虚拟主机配置方法。
#<Directory "D:/www/em">
# Options Indexes FollowSymLinks
# Order allow,deny
# Allow from all
# </Directory>
时间: 2024-10-03 05:49:05