[英]htaccess root domain and sub domain direction
Hi can you help me about this ? 嗨,您可以帮我吗? because I dont know how I am supposed to solve it.
因为我不知道该怎么解决。
I am getting the problem if I write mysite.com/australia/ or mysite.com/australia/something ERROR 404 - PAGE NOT FOUND but if I write www.mysite.com/australia/ site is perfectly open 如果我写了mysite.com/australia/或mysite.com/australia/something错误404-页面未找到,但是我写了www.mysite.com/australia/,则网站出现了问题
I am getting another problem if I write my subdomain name like this www.test.mysite.com/ it is showing Server not found but if I try test.mysite.com/ or photo.mysite.com/ then site is perfectly open how can I solve this kind of problem? 如果我写这样的子域名www.test.mysite.com/,则出现另一个问题,它显示服务器未找到,但是如果我尝试使用test.mysite.com/或photo.mysite.com/,则网站完全打开了我可以解决这种问题吗?
You need to edit the apache conf file and add a server alias: 您需要编辑apache conf文件并添加服务器别名:
<VirtualHost *:80>
# This first-listed virtual host is also the default for *:80
ServerName www.example.com
ServerAlias example.com
DocumentRoot "/www/domain"
</VirtualHost>
See: http://httpd.apache.org/docs/2.4/vhosts/name-based.html 请参阅: http : //httpd.apache.org/docs/2.4/vhosts/name-based.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.