Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Enabling SSL in CakePhp

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 3.30k
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: