Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
据我所知,cname 不能这样做。所以我在 sub1.site1.com 上的 .htaccess 文件中有这个规则:
RewriteEngine On Options +FollowSymlinks RewriteBase / RewriteCond %{HTTP_HOST} sub2.site2.com RewriteCond %{REQUEST_URI} !subdir/ RewriteRule ^(.*)$ subdir/$1 [L]
它不工作...
将所有子域(记录 *,类型 A)指向托管(代码)
在 .haccess 添加行
RewriteCond %{HTTP_HOST} (.*).domain.ext [NC] # %1 RewriteRule (.*) domain.ext/%1/$1 [L] # $1