R
R
random_object2019-06-19 12:42:34
CMS
random_object, 2019-06-19 12:42:34

Non-existent 404 page returns 200 code - how to fix it?

Hello, the site has product pages like site.ru/category/good1.html If you add gibberish at the end of the URL, for example site.ru/category/good1.htmlfsdfsdf, the page gives a full duplicate of the page site.ru/category/good1.html
Questions 2.
1. Why is this happening
2. How to fix it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Kolesnikov, 2019-06-19
@NikitOS_MV

Check the routing class, or rather the method for checking routings.
If checking with regular expressions, add $ at the end of the regular expression.
For example, preg_match('#^'.$route.' $ #, ***)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question