In the .htaccess file i've added this rules to force all users to visit the website under HTTPS.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{THE_REQUEST} !/(robots\.txt|sitemap\.xml|us_portfolio-sitemap.xml|post-sitemap.xml|page-sitemap.xml)\s [NC]
RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^index\.php - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
But when a user try to visit http://example.com/news it will be redirected to https://example.com/?/news. If i call http://example.com/news/ it will be redirected correctly to https://example.com/news/ How i can remove the /?/ from the url so users could be redirected at the right page?