N
N
Nicholas2020-04-10 17:50:01
URL Handling
Nicholas, 2020-04-10 17:50:01

Perversion with a 301 redirect, how to set it up correctly?

Good day, friends.
The task looks something like this.
It meant a website builder to which several subdomain names were attached (sale.mysite1.ru , products.mysite1.ru ), on which, respectively, there were different funnels (in my case, selling).
When switching to another site builder, I had to build duplicates on a different domain and it was decided to do everything on the same name but with several levels. I’ll say in advance that in the past, optimization work was carried out on these same sub-domain names, which is probably why the 301 redirect is more likely to come into play.
Both domain names are tied to a hosting panel and have access to directories.
what exactly is required: (All links are fictitious, and any match with real-life link masses is random)
1. redirect from
h*tps://sale.mysite1.ru/15-spb
to
h*tps://mysite2. ru/sale/15-sposobow
_____________
2. h*tps://products.mysite1.ru/zasd
to this
h*tps://mysite2.ru/products/zasady
_____________________
what result was achieved:
in the sub domain name folder ( I specify the path)
domains/mysite1.ru/public_html/sale/ I
create a file without the extension 15-spb I
write the following in the file. the code

<meta http-equiv="refresh" content="0; url=h*tps://mysite2.ru/sale/15-sposobow">

The result is the following, redirection works. There is one thing, but when redirecting, it says that the connection is not protected NET::ERR_CERT_COMMON_NAME_INVALID
SSL certificates are relevant on both domain names! what is true (on one of the domain names, the certificate is very fresh, as it was added to directadmin a day ago (there is a possibility that this is the reason))
help me figure out what is the reason? Is there any suggestion to implement this in some other way?
There were attempts to implement this through the .htacces file, but there are too many conditions to contain, which, I admit, I am a beginner and have never come across this yet (since the domain is one final and there are many subdomains. In a specific situation, I described with 2 but in a real situation they 4).

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question