使用rewrite 来配置 apache二级域名
ServerName http://www.phprm.com
ServerAlias *.phprm.com phprm.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^((?!www)w)+.phprm.com$
RewriteRule ^/?$ /domainAction.action?subDomain=%0 [L,PT]
文章地址:https://www.phprm.com/code/33060.html
转载随意^^请带上本文地址!