Ich brauche jeden Aufruf einer bestimmten Subdomain (s) .example.com.xx fügen Sie das www am Anfang und dann umleiten es auf https. Auchhttp zu https Umleitung mit Subdomains und www Konvertierung über htaccess
Bei htaccess redirect to https://www gibt es eine Lösung, aber funktioniert nicht mit sub.example.com.xx Umleiten zu https://www.sub.example.com.xx
RewriteEngine On
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
# [NC] is a case-insensitive match
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Wenn ich http://sub.example.com geben .., ich https://sub.example.com.xx und nicht https://www.sub.domain.com.xx
mit http://yyy.sub.example.com.xx muss mir https://www.yyy.sub.example.com.xx
Beispiele:
example.com.xx ---> https://www.example.com.xx
http://example.com.xx ---> https://www.example.com.xx
https://example.com.xx ---> https://www.example.com.xx
sub.example.com.xx ---> https://www.sub.example.com.xx
http://sub.example.com.xx ---> https://www.sub.example.com.xx
https://sub.example.com.xx ---> https://www.sub.example.com.xx
other.sub.example.com.xx ---> https://www.other.sub.example.com.xx
http://other.sub.example.com.xx ---> https://www.other.sub.example.com.xx
https://other.sub.example.com.xx ---> https://www.other.sub.example.com.xx
Versuchen Sie es jetzt. Aber lösche deinen Cache vorher! – Croises
Ich habe meine Frage bearbeitet. Ihr letztes Beispiel funktioniert zumindest in dem Fall sub.example.com.xx. Vielen Dank . Ich muss die anderen Fälle testen. – FedeKrum