A
A
artemioo2016-09-02 23:13:13
htaccess
artemioo, 2016-09-02 23:13:13

How to redirect the main page with a slash to the main page without a slash?

How to implement 301 redirect in .htaccess from page example.com/to page example.com?

Wrote this code:

RewriteCond %{REQUEST_URI} !(.*/manager.*)
RewriteCond %{HTTP_HOST} (.*)
RewriteCond %{REQUEST_URI} /$ [NC]
RewriteRule ^(.*)(/)$ $1 [L,R=301]

It works for subcategories (removes slashes), but not for the main one.
What needs to be done to remove the slash for the main one?

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