Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8416411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:44:50+00:00 2026-06-10T01:44:50+00:00

I am using SSL for 5 pages while during registration https://www.example.com/step1 https://www.example.com/step2 https://www.example.com/step3 –

  • 0

I am using SSL for 5 pages while during registration

https://www.example.com/step1
https://www.example.com/step2
https://www.example.com/step3 – Auth component login
https://www.example.com/step4
https://www.example.com/step5

After step 3, I am creating a Session of the user using Auth Component which automatically logs the user in by Auth component. However, after step 5, it will redirect to http://www.example.com/welcome

I am using SSL component unforced method to change HTTPS to HTTP .
Everything working fine but the problem is that once I reach the welcome page from step 5 (HTTPS) my auth component session expires. I have tried to debug it, but could not find any solution. Please note that without HTTPS all steps and sessions are working fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:44:52+00:00Added an answer on June 10, 2026 at 1:44 am

    Code in AppController class :

    function beforeFilter() {
    parent::beforeFilter();
    $this->_setupSecurity();}
    
    function _setupSecurity() {
    $this->Security->blackHoleCallback = '_badRequest';
    if(Configure::read('forceSSL')) {
        $this->Security->requireSecure('*');    }
    

    }

    /**
    * The main SecurityComponent callback.
    * Handles both missing SSL problems and general bad requests.
    */

    function _badRequest() {
    if(Configure::read('forceSSL') && !$this->RequestHandler->isSSL()) {
        $this->_forceSSL();
    } else {
        $this->cakeError('error400');
    }
    exit;}
    

    /**
    * Redirect to the same page, but with the https protocol and exit.
    */

    function _forceSSL() {
    $this->redirect('https://' . env('SERVER_NAME') . $this->here);
    exit;
    

    }

    Follow this link: May be you get your solution..

    https://stackoverflow.com/a/4473178/983624

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a login problem. First i am using SSL while logging. When i
While I've been familiar with HTTPS and the concept of SSL, I have recently
I have trouble using SSL pages with JMeter, which I previously posted here .
I am using relative paths to my CSS document, but on the SSL pages
Here is the code that I am using: if (!($fp = fsockopen('ssl://imap.gmail.com', '993', $errno,
I found some sites using https:// for login page https://login.alibaba.com/ What are the advantages
I'm trying to protect a folder using '.htaccess' and '.htpasswd'. I used http://www.tools.dynamicdrive.com/password/ to
I've been using the following SSLMiddleware on Linode for a while, and my SSL
My site has https sections (ssl), and others are regular http (not using ssl).
How can I have CodeIgniter load specific pages using SSL? I have an apache2/

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.