Redirects er stjórnað í gegnum Cpanel, og Cpanel gerir þessa .htaccess skrá.
Ef ég fer á Cpanel og geri redirect
http://spjall.vaktin.is >
https://spjall.vaktin.is þá kemur upp error þegar ég reyni að fara á vefinn, "to many redirects".
Svona lítur .htaccess skráin út::
Kóði: Velja allt
RewriteEngine on
<Files 403.shtml>
order allow,deny
allow from all
</Files>
RewriteCond %{HTTP_HOST} ^spjallid\.is$ [OR]
RewriteCond %{HTTP_HOST} ^www\.spjallid\.is$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?$ "https\:\/\/spjall\.vaktin\.is\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^xn\-\-spjalli\-2za\.is$ [OR]
RewriteCond %{HTTP_HOST} ^www\.xn\-\-spjalli\-2za\.is$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?$ "https\:\/\/spjall\.vaktin\.is\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^xn\-\-vervaktin\-d6a\.is$ [OR]
RewriteCond %{HTTP_HOST} ^www\.xn\-\-vervaktin\-d6a\.is$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?$ "https\:\/\/www\.vaktin\.is\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^verdvaktin\.is$ [OR]
RewriteCond %{HTTP_HOST} ^www\.verdvaktin\.is$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?$ "https\:\/\/www\.vaktin\.is\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^www2\.vaktin\.is$ [OR]
RewriteCond %{HTTP_HOST} ^www\.www2\.vaktin\.is$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?$ "https\:\/\/www\.vaktin\.is\/" [R=301,L]
Búinn að prófa að bæta við neðst,
fyrst:
Kóði: Velja allt
RewriteCond %{HTTP_HOST} ^spjall\.vaktin\.is$
RewriteRule ^/?$ "https\:\/\/spjall\.vaktin\.is\/" [R=302,L]
og líka:
Kóði: Velja allt
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
En hvorugt virkaði, any thoughts?