ile başka bir etki alanına yönlendiriyor Bunun neden başarısız olduğuna dair hiçbir fikrim yok. Tüm etki alanını www.maindomain.com
'a ve ayrıca http
https
'a yönlendirmek istiyorum, ne eksik? https:/www.maindomain.com/
içinApache2, ssl
# redirect http to https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# redirect without www to www
RewriteCond %{http_host} ^maindomain.com [nc]
RewriteRule ^(.*)$ https://www.maindomain.com [r=301,nc]
# redirect another domain to www.maindomain.com
RewriteCond %{HTTPS} off # this i was missing
RewriteCond %{HTTP_HOST} ^(www\.)?anotherdomain.com [NC]
RewriteRule ^(.*)$ https://www.maindomain.com [R=301,L]
http://maindomain.com
https:/www.maindomain.com/
içinhttp://anotherdomain.com
https:/www.maindomain.com/
içinhttps://anotherdomain.com
Kişisel Kural aşağıdaki satırı eksik olduğundan başka etki alanı için Https yönlendirme için HTTP başarısız
garip, RewriteCond% {HTTPS} kapalı ipucundaki yorum şu an işe yarıyordu, ama yanıtı silmek istediğim gibi silindi, 3. yönlendirmede 2. RewriteCond eksik –