更新时间:2023-09-12 09:04:04
关闭,试试这个:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/websites/
RewriteCond %{HTTP_HOST} ^(www\.)?([^.]+\.domain\.net.*)$ [NC]
RewriteRule ^(.*)$ /websites/%2/$1 [L]
请注意,这只会工作,如果所有的演示* .domain.net 指向同一个文档根目录作为主域( domain.net )
Note that this will only work if the all the demo*.domain.net point to the same document root as the main domain (domain.net).