Answer the question
In order to leave comments, you need to log in
How to keep current URL at 404 page without breaking redirect rules?
There is a site, in .htaccess there is a rule for redirects from urls without "/" to url with "/" at the end (test.ru/catalog -> test.ru/catalog/) This rule also applies to 404 pages, that is, test .ru/dsadadasda is first redirected to test.ru/dsadadasda/ , then a 404 error page is displayed. How to show a 404 error page immediately, without a redirect, but at the same time not violate the rules for other urls?
Answer the question
In order to leave comments, you need to log in
It is necessary to remove the redirect for missing pages.
Namely: transfer the fix rule from .htaccess to the URI-router script and fix the url with a closing slash there and don't execute at 404.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question