Site redirecting to url with / at the end

0

When I log into my site www.example.com

It redirects to www.example.com /

How to solve this?

Follow my .haccess

Options -Indexes

#Ativamos a RewriteEngine
RewriteEngine on

RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^(www\.)?idealnutri\.com$ [NC]
RewriteRule ^.*$ https://www.idealnutri.com%{REQUEST_URI} [R,L]

RewriteRule ^sitemap\.xml$ gera_xml.php [L] 
RewriteRule ^noticia/([^/]*)\.html$ /noticia.php?link=$1 [L]

    
asked by anonymous 01.01.2018 / 22:54

1 answer

-1

I have the impression that the problem is the moment you force HTTPS

Try this:

RewriteCond %{HTTP_HOST} ^(www\.)(.+) [OR]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www\.)?(.+)
RewriteRule ^ https://%2%{REQUEST_URI} [R=301,L]
    
02.01.2018 / 15:02