Tjena hej
Har följande i en configfil för en virtual host: [kod] RewriteEngine on
RewriteCond %{HTTP_HOST} !^$ [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC,OR]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=302][/kod]
Det fungerar nästan... Dessa skrivs som som dom ska:[kod]http://domain.com
http://www.domain.com
[/kod]
Men om jag anger https://domain.com får jag "Page not found". Har givetvis med domain.com som ServerAlias, och http://domain.com fungerar som det ska, men https://domain.com fungerar inte.
Förslag någon?
Har följande i en configfil för en virtual host: [kod] RewriteEngine on
RewriteCond %{HTTP_HOST} !^$ [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC,OR]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=302][/kod]
Det fungerar nästan... Dessa skrivs som som dom ska:[kod]http://domain.com
http://www.domain.com
[/kod]
Men om jag anger https://domain.com får jag "Page not found". Har givetvis med domain.com som ServerAlias, och http://domain.com fungerar som det ska, men https://domain.com fungerar inte.
Förslag någon?