I have looked at some posts here, but they dont answer my problem. I have subdomains and addon-domains and not all of them have a certificate yet. So I cannot use a generic solution.
my .htaccess is
RewriteEngine On
#software
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^(www\.)?example\.software$ [NC]
RewriteRule ^(.*)$ https://example.software%{REQUEST_URI} [R=301,L,QSA]
#force html extn
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
#For existing publishing
RewriteCond %{HTTP_HOST} ^example.software$ [NC]
RewriteRule ^(download)/([^/]+)$ https://example.software?mode=file&name=$2 [L]
With this, the following work
<a href="https://www.example.software">
<a href="http://www.example.software">
<a href="https://example.software">
<a href="http://example.software">
But this does not work
<a href="www.example.software">
It translates to
https://example.software/www.example.software
I tried adding this as second ruleset, its generic but still doesnt work
# remove www from https
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [R=301,QSA,NC,L]
I tried this and it has the same result
RewriteCond %{HTTP_HOST} ^www\.example\.software$ [NC]
RewriteRule ^(.*)$ https://example.software%{REQUEST_URI} [R=301,L,QSA]
Even with just this from another post here gives me the same result
RewriteCond %{HTTP_HOST} ^www.example.software$ [NC]
RewriteRule ^(.*)$ https://example.software$1 [R=301,L]
Is something else on my system causing it ?