Force SSL connection <SOLVED>

MikeLFD

Joined: 2013-03-22
Posts: 79
Posted: Sat, 2013-08-24 21:46

I just upgraded my hosting account to use SSL
I want to have http connections to my existing gallery installation forced to https

What do I need to change in this section of the htaccess file:

<IfModule mod_rewrite.c>
   Options +FollowSymLinks
   RewriteEngine On
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L]
   RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L]
   RewriteRule ^index.php/(.*) $1 [QSA,R,L]
 </IfModule>

Thanks in advance for any help

NEVER MIND I found an answer
Change the above (which is located at the bottom of the htaccess file located in your installed gallery folder) to look like this:

<IfModule mod_rewrite.c>
   Options +FollowSymLinks
   RewriteEngine On
   RewriteBase /
   RewriteCond %{HTTPS} !=on
   RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L]
   RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L] RewriteRule ^index.php/(.*) $1 [QSA,R,L]

 </IfModule>