Answer the question
In order to leave comments, you need to log in
How to make the web server (Apache) not search for pages at the entered URL, but delegate this task to the router?
Typically, the router checks the URL against a certain list of available addresses, but if the addresses in the list are not real directories, then the web server returns 404, while I need the router to process the URL, and dynamically create the page.
Answer the question
In order to leave comments, you need to log in
In the end, I solved it like this:
.htaccess in the root of the site:
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ index.php [QSA,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question