Answer the question
In order to leave comments, you need to log in
Why is a slash added to the end of the url?
Hello, can you please explain why a slash is added to the end of the url?
I have htaccess file which contains code
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/userimages/
RewriteRule .* index.php
Answer the question
In order to leave comments, you need to log in
If, after adding a slash, all fonts and styles on the page disappear, then you need to specify the path to the files from the root of the site. Those. instead of "style.css" put "/style.css". Or explicitly specify the base address for all relative links <base href="http://site.ru/">
htmlbook.ru/html/base
In the Apache settings, DirectorySlash is usually enabled and existing directories are redirected with a slash. Disable this behavior by adding DirectorySlash Off
to htaccess.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question