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

  • Home
  • SEARCH
  • 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 1098941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:39:25+00:00 2026-05-17T00:39:25+00:00

I need to put https on some of the URL but not on all

  • 0

I need to put https on some of the URL but not on all the URL. I am using zend URl view helper for all the links. I have a *.example.com SSL certificate for whole site. Now I open site with https://www.example.co, then all the link on home page or other pages contains https in URL. How can I make some specific request on the https url and other page should be opened normal.

I also need to pt some redirection so that if somebody open the specific pages in normal URL then they redirected on https url. I think the .htaccess redirection will work for that.

Any help ????

Thanks in advance!!!

  • 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-05-17T00:39:26+00:00Added an answer on May 17, 2026 at 12:39 am

    I rather used a simple method and that does not required any change in urls generation/route. I wrote following lines in routeStartup function of a plugin and haven’t made any change in URLs route.

    public function routeStartup(Zend_Controller_Request_Abstract $request)
    {
    
       $controller=$this->_controller = $this->_front->getRequest()->getControllerName();
       $action=$this->_controller = $this->_front->getRequest()->getActionName();
    
        if($_SERVER['SERVER_PORT']!=443)
        {
    //controller and actions array to check ssl links
            $actionArr=array('index'=>array('registration'),'account'=>array('editacc','edit'),'dealer'=>array('*'));
            if(array_key_exists($controller,$actionArr)!==false)
            {
                if(in_array($action,$actionArr[$controller]) || $actionArr[$controller][0]=='*')
                {
                    $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
                     $redirector->gotoUrl(SITE_LIVE_URL_SSL.$controller."/".$action);    
                }
            }
    
    
        }
        else
        {
    //controller and action array that should not be on ssl.
              $notAactionArr=array('usersearch'=>array('mainserarch'),'account'=>array('index'),'onlineusers'=>array('*'));
            if(array_key_exists($controller,$notAactionArr)!==false)
            {
                if(in_array($action,$notAactionArr[$controller]) || $notAactionArr[$controller][0]=='*')
                {
                    $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
                     $redirector->gotoUrl(SITE_LIVE_URL.$controller."/".$action);    
                }
            }
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to put some links in one TextView . For better user experience,
I need to put a custom hover menu from http://www.addthis.com/help/toolbox , but Rails uses
I need to put a anchor inside my li, using the same space as
I need to put 2 textures on the same Square, but it keeps crashing
I'm creating some big files (DB exports) with Java and I need to put
I'm interested in url signing (e.g. http://.../?somearg=value&anotherarg=anothervalue&sig=aSKS9F3KL5xc ), but I have a few requirements
Lets say i have a page called https://url.com/test and https://url.com/test2 class Test extends Application
first of all sorry for my english , not my main lang. I need
This may seem odd but I'm simply trying to put a url together. The
I have some code that someone wants to put on their site. Here is

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.