我正在尝试编写一个 mod_rewrite 来像这样工作
wildcard.subdomain.domain.com
=>subdomain.domain.com/data.php?q=wildcard
wildcard.subdomain.domain.com/?repeat=1
=>subdomain.domain.com/data.php?q=wildcard&repeat=1
subdomain.domain.com
=>data.php
www.subdomain.domain.com
=>data.php
到目前为止我在 .htaccess 中所做的事情
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+)\.abc\.def\.com\.br$ [NC]
RewriteCond %1 !^(www)$ [NC]
RewriteRule ^.*$ data.php?q=%1
</IfModule>`