Answer the question
In order to leave comments, you need to log in
Wordpress returns 200 for invalid category links. How to fix?
Good afternoon!
In the process of repairing the client site, I encountered such a problem that WordPress processes incorrect links to categories and returns a 200 response on them and the content of the category whose address is left at the end of the address.
To make it clearer, I will give an example on a standard WordPress site without third-party plugins and with a default theme.
Here is a section with the code all and the name "About the car"
Here is a link to this
section - https://2112.hamdeew.ru/category/all/ .hamdeew.ru/category/hi-toster/all/
And even like this - https://2112.hamdeew.ru/category/wtf/test/broken/l...
But in the blog post example, incorrect links are automatically fixed and redirected to the correct content:
https://2112.hamdeew.ru/tst/tst/tst/2013/06/buy... -> https://2112.hamdeew .ru/2013/06/bought-butter/
Guys, is this a bug or a feature? And how to treat it?
Answer the question
In order to leave comments, you need to log in
https://github.com/h5bp/server-configs-apache/blob...
only your own protocol can be specified
RewriteCond %{HTTP_HOST} ^www.xn------6cdbb3azdvbfjfjeedepxgkdiodhc9gqe5d5a2j.xn--p1ai/$ [NC]
/
/$
, you need to remove / here.
And who will screen the points for you?
and who will put the protocol in the steering wheel for you?
This is the specifics of adaptive content and the mechanics of Rewrite Rules with flexible endpoints and query vars.
This usually does not create problems. And apparently because no one climbs there.
If the site is public and SEO is needed, then most likely this is solved through the canonical meta tag, which automatically gets up correctly if you install the SEO Yoast plugin or some other SEO plugin.
If Pts is annoying, then you can add a 301 redirect or 404 error through the template_redirect hook.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question