Question 1: If I have a domain name abc.com
, now I want to automatically jump to about when I type
abc.com in the browser. abc.com
, just like the official website of gitlab
.
What steps are needed to achieve this effect?
What knowledge is needed?
Question 2: If I now have a domain name abc.com
, there are two folder directories under the html
directory of nginx
, one is bbs
, one is wiki
, how to set it up to access under the
bbs directory when accessing
bbs.abc.com index
, what about opening index
in the wiki
directory when visiting wiki.abc.com
?
What steps are needed to achieve this effect?
What knowledge is needed?
Note: I will learn Nginx
, but I hope you can give me the knowledge I need first, or give me some tips and tell me what knowledge and steps are needed to achieve it. Thank you.
Question 1
Too many methods
The easiest thing is to set it during DNS resolution
301跳转
或者302跳转
,将abc.com
跳转到about.abc.com
can also be set in nginx
can also be set in the code, such as in
js
中指定window.locatioin
, the back-end language response returns 301 and location, etc.Question 2
In fact, you don’t need much knowledge or steps. You can achieve the effect you want by just searching online. If you want to go deeper, please google for question 1
url redirect
301
302
nginx
显式跳转
隐式跳转
等关键词问题2请google
nginx 配置文件
Use keywords:
nginx domain name redirection
For question 1: Most resolution service providers have the "explicit URL forwarding" function. You can put
abc.com
解析到about.abc.com
.Just a little google and you will get the answer immediately http://guge.suanfazu.com/sear...