php - Add trailing slash to domain name


Good afternoon!

I need add trailing slash to domain name. For example: from to I try to add settings to .htaccess:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ /$1/ [L,R=301]

but Wordpress trims trailing slash only in domain name, other addresses work fine: -

Best regards, Deifinger!




is equivalent to  

you cannot redirect your url from: 


People are also looking for solutions to the problem: php - Flatten multidimensional array to 3 levels preserving the first level keys


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.