问题
I've created sub-domain URL on my site but it always shows "page not found" error. When I write foldername.website.com
so it shows page not found but it works when I write website.com/foldername
. I've removed all code of .htaccess from main folder and sub folder but still sub-domain URL is not working.
回答1:
Your web folder design should be something like:
website.com
/ <root> -----> <content for website>
forum.website.com
/ <root> --------> <Content for subdomain website>
You really can not have a nested relationship for these two folders, like website folder cannot contain the subdomain folder; which looks to be the case here.
来源:https://stackoverflow.com/questions/31913023/sub-domain-url-is-not-working