First of all, I'm new to stackoverflow, so sorry if the title should've been more descriptive.
I've searched and tried different solutions posted here on stackoverflow but not a single one seems to solve my specific issue.
First of all, here's my .htaccess file
RewriteEngine On
RewriteCond %{HTTP_HOST} ^website\.io [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.website.io/$1 [R,L]
RewriteRule ^hosting/?$ hosting.php [NC,L]
RewriteRule ^premium/?$ premium.php [NC,L]
RewriteRule ^register/?$ register.php [NC,L]
RewriteRule ^auth/?$ login.php [NC,L]
RewriteRule ^contact/?$ contact.php [NC,L]
RewriteRule ^auth/forgot?$ forgot.php [NC,L]
RewriteRule ^about/?$ about.php [NC,L]
RewriteRule ^auth/activate?$ activate.php [NC,L]
RewriteRule ^website/new?$ createwebsite.php [NC,L]
RewriteRule ^profile/edit?$ editprofile.php [NC,L]
RewriteRule ^auth/logout?$ logout.php [NC,L]
RewriteRule ^privacy/?$ privacy.php [NC,L]
RewriteRule ^profile/?$ profile.php [NC,L]
RewriteRule ^auth/forgot/reset?$ resetPassword.php [NC,L]
RewriteRule ^tos/?$ tos.php [NC,L]
RewriteRule ^website/?$ websites.php [NC,L]
RewriteRule ^website/manage?$ managewebsite.php [NC,L]
RewriteRule ^website/manage/([A-Za-z0-9-]+)/?$ managewebsite.php?id=$1 [NC,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^(.*)$ https://www.website.io%1 [R,L,NC]
My first problem is that HTTPS is not being redirected properly in some cases. For example, if I enter "website[dot]io" in the address bar, it redirects to "[https]://www.website.io", the desired result. However, if I type either "[http]://website.io" or "[http]://www.website.io" or "www.website[dot]io" it stays in the HTTP, which I don't want it to. Is there a way to ALWAYS redirect the traffic to HTTPS, regardless of the way it's typed in the address bar?
My second problem is that I want to eliminate the last trailing slash from the url in case someone decides to type it that way. Example "[https]://www.site.io/register/" should redirect to "[https]://www.site.io/register" without the last trailing slash.
Thank you so much, everyone!
P.S.: I replaced some "http(s)" with "[http(s)]" because it won't let me post links.