I have http://wikiquest.ru/ domain to your host cloud.digitalocean.com.
and has the domain http: //xn–c1aabfob6cfv0g.xn–p1ai/ on another host. I need to make a redirect from http://wikiquest.ru/ at http: //xn–c1aabfob6cfv0g.xn–p1ai/ how do I do this on your host?

p.s. I almost know nothing about this, please write in detail. Thank you

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

5 answers

what are you use LAMP OR LEMP !!!

Just create a very simple VirtualHost for the old domain in which you redirect it to the new domain:

<VirtualHost *:80>
    ServerName xy.example.com
    RedirectPermanent / http://abc.example.com/
    # optionally add an AccessLog directive for
    # logging the requests and do some statistics

server_name supports suffix matches using .mydomain.com syntax:

server {
  server_name wikiquest.ru;
  rewrite ^ http://www.xn--c1aabfob6cfv0g.xn--p1ai$request_uri? permanent;
server { server_name .domain.com;return 302 $scheme://forwarded-domain.com;}

or on any version 0.9.1 or higher:

server {
  server_name .mydomain.com;
  return 301 http://www.adifferentdomain.com$request_uri;
Submit an Answer