A
A
Andrey Yusupov2020-08-18 15:27:11
htaccess
Andrey Yusupov, 2020-08-18 15:27:11

Is it possible to implement a redirect to a 404 page if the page address is not completely entered?

Good afternoon everyone. I tried to find a solution to my question in the search, but there is nothing specific. /
The essence of the problem: There is a site on WordPress - smart-event.fun . If the user adds any one letter ( /h , /a ) at the end of the site address, then the browser will not redirect it to a 404 page, but will randomly complete the address and open the link. I do not need this behavior, it is expected that there is no such page, then there will be a redirect to a 404 page. I tried to find something on the Internet, there are different types of redirects, but I don’t need one like it anywhere.
Dear users, tell me if it is possible to implement such behavior in general and how is it possible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sl0, 2020-08-18
@mdaa

If there is Apache, judging by the tags, then you need to look in .htaccess for RewriteMap and RewriteRule and see what is written there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question