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

**URL:** <https://discourse.cakephp.org/t/redirect-http-to-https-for-ssl-solved/3744>\
**Category:** Need Help\
**Created:** [January 12, 2018, 2:39am UTC](https://discourse.cakephp.org/t/redirect-http-to-https-for-ssl-solved/3744 "2018-01-12T02:39:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![somegadollar](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@somegadollar](https://discourse.cakephp.org/u/somegadollar)\
**Post date:** [January 12, 2018, 2:39am UTC](https://discourse.cakephp.org/t/redirect-http-to-https-for-ssl-solved/3744/1 "2018-01-12T02:39:50Z")

</div>

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](https://somegadollardays.com/00.Oldsitecopy/index.php)  
here is the admin side link: [https://somegadollardays.com/00.Oldsitecopy/admins/login](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']);
```
