Welcome Guest, Not a member yet? Register   Sign In
Can't get to work ssl
#1

[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!
#2

[eluser]Tpojka[/eluser]
Have you try this like:
Code:
$config['base_url'] = ($_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http') . "://{$_SERVER['HTTP_HOST']}/";
#3

[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..
#4

[eluser]peggy023[/eluser]
I think it always redirects me to http..but I don't know where..
#5

[eluser]Tpojka[/eluser]
Post your htaccess.
#6

[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..
#7

[eluser]Tpojka[/eluser]
What is happening when uncommented (removed hash tags in four lines)? Tried already?
#8

[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..
#9

[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?..
#10

[eluser]Tpojka[/eluser]
Check this topic too.




Theme © iAndrew 2016 - Forum software by © MyBB