尝试如下:
RewriteEngine On
RewriteBase /
# Redirect HTTP with www to HTTPS without www
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.joshmoto\.wtf$ [NC]
RewriteRule .* https://joshmoto.wtf%{REQUEST_URI} [R=301,L]
# Redirect HTTP without www to HTTPS without www
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Redirect HTTPS with www to HTTPS without www
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.joshmoto\.wtf$ [NC]
RewriteRule .* https://joshmoto.wtf%{REQUEST_URI} [R=301,L]