Hello All,
In this blog we will discuss about how to enable ssl https in your cakephp application on the server.
You can enable SSL on live server by following these steps:-
1.In your core.php add/change the BASE_URL defination to https:
define('BASE_URL','https://'.$_SERVER['HTTP_HOST']);
Configure::write('BASE_URL','https://'.$_SERVER['HTTP_HOST']);
2.Modifying your's website's /app/webroot/.htaccess and /app/.htaccess to:
<IfModule mod_rewrite.c>
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]
</IfModule>
0 Comment(s)