The site uses CNC, all requests are transmitted to index.php. At the moment, the following entries are present in htaccess:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L] Nothing tricky, and therefore works fine. But there is a small problem - the mandatory presence of a slash at the end of the URL. The URLs of only two types: http://site.ru/part_1/part_2/ (the slash is needed at the end ) and http://site.ru/part_1/part_2/?param=something ( slash, of course, is not needed ) . In the first case, if the URL was entered, for example, by the user manually and without a slash at the end, it must be added. Of course I can do the PHP checks already when processing the request, but I would like to humanize it somehow. I would be grateful for the help.