Redirect http to https for SSL.....SOLVED


#1

Hello i need a little help.
I fixed the issue with cakephp 2.9 redirecting my site from http to https but now on user side and admin side the logins show blank pages.

here is the user side link: https://somegadollardays.com/00.Oldsitecopy/index.php
here is the admin side link: https://somegadollardays.com/00.Oldsitecopy/admins/login
admin login and password is : admin

**Below is the htaccess file (above app folder):

RewriteEngine on

RewriteRule ^$ app/webroot/ [L]

RewriteRule (.*) app/webroot/$1 [L]

....................................................................................................

**Below is htaccess file in app folder:

#RewriteEngine on

#RewriteRule    ^$    webroot/    [L]

#RewriteRule    (.*) webroot/$1    [L]

    RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

............................................................................................................

**Below the scrip added to the core.php file in the app/config folder

define(‘LOG_ERROR’, 2);

define('BASE_URL','https://'.$_SERVER['HTTP_HOST']);
Configure::write('BASE_URL','https://'.$_SERVER['HTTP_HOST']);