Answer the question
In order to leave comments, you need to log in
How to make a 301 redirect from large Cyrillic letters to small ones?
this helped solve the problem with latin
if(preg_match('/[A-Z]/', $_SERVER['REQUEST_URI'])) {
header('HTTP/1.1 301 Moved Permanently');
header('Location: '.strtolower($_SERVER['REQUEST_URI']));
}
Answer the question
In order to leave comments, you need to log in
did so $x = mb_strtolower($x);
and closed all URLs with capital letters in Cyrillic from indexing.
Something like this:
preg_match('//u', $_SERVER['REQUEST_URI'])
use /u in order for Cyrillic to be processed correctly.
Keep a convenient service to help https://regex101.com/
this is a fairly simple redirect, but there is a small problem, the meaning of doing it is simply absent, what you propose speaks of a fundamentally not understanding the basics of SEO, and this is exactly why you are going to dealt a redirect.
And about the potential danger of this event.
THIS is not Windows for you in UNUX-like systems (and this is everything except windows) OS, the file system is case-sensitive. And if in Windows it is really the same characters at the file system level, then in Linux they are completely different.
And so
why you don’t need to do this,
because you don’t have a single case when it would interfere with the client, for example, he got to 404, which was displayed in your metrics, and the percentage of such hits is higher than 001
2. The person still has a
bookmark with the old URL, and it would not be bad to give him 200 instead of 301+200 the weight through 301 is given away not all.
What can threaten.
well, at least site.ru/aaa.Jpg - jnlfcn 301 and naturally 404, for the reason described above,
and therefore you will need to exclude all directory links and files.
In fact, leaving only what the CNC site generates.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question