.htaccess 将所有子域重定向到一个页面
我正在尝试将.htaccess 将所有子域重定向到一个页面,.htaccess,redirect,subdomain,.htaccess,Redirect,Subdomain,我正在尝试将(http://*.domain.com)上的所有子域重定向到spesific html文件(http://domain.com/index.html)。但我也希望可见子域名不会改变 我已经用.htaccess尝试过这个: Options -MultiViews Options +FollowSymLinks RewriteEngine On RewriteBase / #RewriteCond %{REQUEST_URI} !^/parent/ RewriteCond %{HT
(http://*.domain.com)
上的所有子域重定向到spesific html文件(http://domain.com/index.html)
。但我也希望可见子域名不会改变
我已经用.htaccess尝试过这个:
Options -MultiViews
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
#RewriteCond %{REQUEST_URI} !^/parent/
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com$
RewriteRule (.*) /index.html [L]
但它根本不起作用
有人能帮我吗?子域和目录有点不同。要捕获所有子域,您需要有一个:
*.example.com. 3600 IN A host1.example.com.
最好的办法是联系你的主机提供商。他们中的一些人有这样的设置。哦。我的主机提供商明确表示他们不支持通配符。无论如何,谢谢你。