M
M
MyQuestion2021-10-15 10:26:47
htaccess
MyQuestion, 2021-10-15 10:26:47

WP - slugs of non-existent pages, consisting only of numbers, give a 200 response. How to get rid of them?

Good afternoon!

Pages like site.ru/slug/12345/ give 200ok. If the digital slug comes from the root, for example site.ru/12345/ I will get a 404 error.
When I go to pages like site.ru/slug-1/12345/, I get to the existing slug-1, but its address continues to look like site.ru/slug-1/12345/. This is not a redirect, in my understanding.
The nesting of existing pages does not matter, it is important that the digital slug be the last one . A digital slug that is not the last in the url will return a 404, for example site.ru/slug-1/12345/slug-2/ will return a 404 error.

The 200th response will receive a slug consisting only of numbers and located at the end of the url chain.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Smirnov, 2021-10-15
@fillosofik

Where did you get non-existent digital labels from? Give me a link to watch it on your site. In general, you know where the display of links in WordPress is done.

V
Vladimir Druzhaev, 2021-10-18
@OtshelnikFm

well... it's wordpress. and this is a common occurrence. So put the standards seo plugin. He will give where it is necessary canonical - according to them, the PS will determine what is more important. And so - cnc in VP generates a bunch of shit. And only seo plugins or seo frameworks will fix it. There is no solution in the kernel.
and the fact that you have drafts or something lying around in the basket is not a problem for VP. He gives what is written in his brain (read in the database)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question