T
T
Taame2020-03-07 16:29:22
htaccess
Taame, 2020-03-07 16:29:22

What's wrong with slash?

The essence of the problem is as follows. In the html code, a link of the form <a href="/catalog/">Каталог</a>
I.e. when you navigate, the directory should be displayed at site.ru/catalog/ , but it gives a 404 error.
If you remove the last slash site.ru/catalog , then everything is displayed.

.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


site.ru/catalog/
5e63a13337347500865068.png

site.ru/catalog
5e63a153402ae498253445.png

PS: Don't pay attention to https

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question