我正在尝试将温室的所有子域重定向到“温室\测试站点”,但无法使其正常工作。
我不了解DocumentRoot和VirtualDocumentRoot之间的区别,不确定是否有任何区别。
任何想法,为什么它不工作'testsite.hothouse'重定向很好。'test.hothouse'或任何subdomain.hothouse都不(重定向到'www.subdomain.hothouse')。
我花了一整天的时间来解决这个问题,我清除了所有浏览器缓存。顺便说一句我正在使用WAMP
DocumentRoot "D:\wamp\www"
<Directory "D:\wamp\www">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot "D:\wamp\www"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
VirtualDocumentRoot "D:\wamp\www\hothouse\testsite"
ServerName testsite.hothouse
ServerAlias test.hothouse
</VirtualHost>
<VirtualHost *:80>
VirtualDocumentRoot "D:\wamp\www\hothouse\testsite"
ServerName subdomain.hothouse
ServerAlias *.hothouse
</VirtualHost>
问题不是apache设置,但是我没有更新Windows主机文件以重定向到localhost。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句