我不能在域名前使用"www“访问我的网站,但如果我不使用"www”,我可以访问。我希望两者都可以访问。
我非常熟悉在Linux上使用WAMP服务器,但我并不经常和Apache2一起使用它。我已经在配置文件中做了大量的修改,并尝试了几种不同的方法,但似乎都不起作用。
以下是httpd-vhosts.conf文件:
# Virtual Hosts
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName wherehousemke.com
DocumentRoot "c:/wamp64/www/wherehousemke"
<Directory "c:/wamp64/www/wherehousemke/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
Require all granted
</Directory>
</VirtualHost>我正在尝试让它工作的网站是http://wherehousemke.com。该URL是有效的,但如果您在其中添加"www“,它将不起作用。
发布于 2019-03-23 07:24:24
您需要添加从您的TLD重定向到www子域https://www.digitalocean.com/community/questions/using-cname-for-www-redirection的DNS记录
https://stackoverflow.com/questions/55308994
复制相似问题