虚拟主机怎么实现二级域名功能

时间:2020-6-27作者:洋溢网赚

用.htaccess实现二级域名功能

将下面的网址替换为你的网址即可。

RewriteCond?%{HTTPHOST}?^xqhym.com$
RewriteCond?%{REQUESTURI}?!^/music/
RewriteCond?%{REQUESTFILENAME}?!-f
RewriteCond?%{REQUESTFILENAME}?!-d
RewriteRule?^(.*)$?/music/$1
RewriteCond?%{HTTPHOST}?^xqhym.com$
RewriteRule?^(/)?$?music/index.php?[L]