Answer the question
In order to leave comments, you need to log in
How to bind a domain to a url?
Hello
Please tell me how can I link a domain to some page of the site, for example,
namesite.domen/username is a link to profiles
How can I make this link open on this domain?
Answer the question
In order to leave comments, you need to log in
Well, yes, without setting up a web server, this cannot be done in any way.
In any case, you need to bind the domain to some web server that will process the request to the domain and slip the desired page. One way is proxying.
If the original site is under your control, then you can attach a new domain to the same site and do everything with the help of rewrites in .htaccess or the nginx config. If not controlled - then only in the above way.
What is available?)
If it is possible to configure nginx, then the easiest way is something like this:
server {
listen 80;
server_name домен_который_нужно_проксировать;
location / {
proxy_pass http://namesite.domen/username;
proxy_set_header Host namesite.domen;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question