M
M
maolo2015-09-29 05:19:39
linux
maolo, 2015-09-29 05:19:39

Redirecting a site to a subdomain using hosts?

I want to redirect from site.ru to sub.site.ru on one ip - I got tired of constantly adding a subdomain to one site, and links in rss fall without a subdomain.
hosts I wrote in the header so that there were no misunderstandings - as I already found out, only ip is indicated there, i.e. this entry does not work:
sub.site.ru site.ru
Is there any other way to solve this?
System is Ubuntu.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Azazel PW, 2015-09-29
@azazelpw

If it is in /etc/hosts that you need to register then so.
10.10.10.10 site.ru
10.10.10.10 sub.site.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question