Answer the question
In order to leave comments, you need to log in
How to remove slash at the end of one page with htaccess redirect?
There is a main page of the site - site.com. It is necessary that when the user enters "site.com/", a redirect to the "site.com" page occurs. It is important that this works only for one main page, and not for all pages of the site. And you need to do it through htaccess.
I googled but didn't understand anything. There only about how to remove slashes from all pages. I can’t deal with all these RewriteRule and RewriteCond, and I don’t know regular expressions at all. There is no need to study all this. You just need to solve this particular problem.
Answer the question
In order to leave comments, you need to log in
Did the SEO specialists tell you this? It won't work that way, because the main one - it's "/" is always requested this way. Here's how to remove the "/" in an HTTP request "GET /" ?
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question