Can't get to work ssl |
[eluser]peggy023[/eluser]
Hi, I already setup my ssl on my site..and I tried to change the $config['base_url'] = 'https://mysite.com'; but it gives me a redirect loop.. I get the same output when I use a .htaccess redirect.. Help please thank you!
[eluser]Tpojka[/eluser]
Have you try this like: Code: $config['base_url'] = ($_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http') . "://{$_SERVER['HTTP_HOST']}/";
[eluser]peggy023[/eluser]
Hi I tried that and there's no error..but I think it it is still in http://mysite.com.. I want it to use https://mysite.com. EDIT: i tried to put https://mysite.com and i get redirect loop..
[eluser]peggy023[/eluser]
I think it always redirects me to http..but I don't know where..
[eluser]peggy023[/eluser]
RewriteEngine On #RewriteCond %{SERVER_PORT} ^80$ #RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] #RewriteCond %{SERVER_PORT} 80 #RewriteRule ^(.*)$ https://mysite.com/$1 [R=301,L] RewriteCond %{HTTP_USER_AGENT} (android|blackberry|googlebot-mobile|iemobile|iphone|ipod|ipad|opera\smobile|palmos|webos) [NC] RewriteRule ^ http://mobile.mysite.com [L,R=302] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 [L,QSA] This is my htaccess so far..
[eluser]Tpojka[/eluser]
What is happening when uncommented (removed hash tags in four lines)? Tried already?
[eluser]peggy023[/eluser]
yes i already tried..actually this first two lines #RewriteCond %{SERVER_PORT} ^80$ #RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] and this second two lines #RewriteCond %{SERVER_PORT} 80 #RewriteRule ^(.*)$ https://mysite.com/$1 [R=301,L] are different version of redirect..and when i uncommented any of them.. it gives me also redirect loop..
[eluser]peggy023[/eluser]
i'm just curious if there is other function that redirect my site to http or any other config rather than $config['base_url'] ..is it possible that a dns record may have caused this?.. |
Welcome Guest, Not a member yet? Register Sign In |