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 8527697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:37:44+00:00 2026-06-11T08:37:44+00:00

I want to run few pages on https while all others pages run on

  • 0

I want to run few pages on https while all others pages run on http

I wrote below code in .htaccess and on config.inc.php file

.htaccess

RewriteEngine on
Options +FollowSymLinks 
RewriteBase /

RewriteRule ^login/?$ login.php [NC]

# Rewrite non www to www.charityrummage.com
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

# Rewrite to https
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} /login [OR]
RewriteCond %{REQUEST_URI} /do_login.php [OR]
RewriteCond %{REQUEST_URI} /payment/?.*$ 
RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,QSA]

# traffic to http://, except login.php and payment.php
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !(/login|/do_login.php|/payment)
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,QSA]

also made some changes in config.inc.php which is required and first file of the website

config.inc.php

$ssl_page = array('login.php','do_login.php','payment.php');
// Note: do_login.php is intermediate page
if(in_array(trim($_SERVER['SCRIPT_NAME'],'/'),$ssl_page)){
    define('PROTOCOL','https://');    
 }else{
   define('PROTOCOL','http://');
}
define('DS','/');
define('URL',PROTOCOL.$_SERVER['HTTP_HOST'].DS);
// based on URL i made CSS and JS Path

here is the website link :

http://www.charityrummage.com.

login page is ssl enabled :

https://www.charityrummage.com/login

BUT

when I run the website, it gives different errors on different browsers and its really annoying. below are the error description on different browsers

IE8

it always prompt for security error and
if i click on Yes then display everything fine except left panel
if i click on NO then certificate error near web address but website works fine.

Chrome ( v :20.0.1132.8 )

display multiple warning about css and js ( see in console ) in below format:

The page at https://www.charityrummage.com/login ran insecure content
from http://www.charityrummage.com/css/reset.css

but if you view source of login page then you can see that every
css and js running with https://

Firefox (v 16.0)

it display lock sign ( secure ) just for few seconds and then gone away
( i m surprised it never prompt security alert for https )
but when we go with page info -> media then many of images are coming from http://

Will you please examine and tell me what is exact problem?

One more thing i want to know.

if https:// pages are not displaying properly then which one is responsible

  • Operating system OR
  • Browser OR
  • server OR
  • Programming issue OR
  • SSL certificate issue

    and at the end what is the solution of this problem?

Thanks

  • 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-11T08:37:46+00:00Added an answer on June 11, 2026 at 8:37 am

    Try with this rule:

    # Force files ending in X to use same protocol as initial request
    RewriteRule \.(gif|jpe?g|png|ico|css|js)$ - [S=1]
    

    or this one:

    # don't do anything for images/css/js (leave protocol as is)
    RewriteRule \.(gif|jpe?g|png|ico|css|js)$ - [NC,L]
    

    Before the # traffic to http://

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

Sidebar

Related Questions

I have code, which i want to run, this takes a few mins so
I want to run wget as follows shell_exec('wget 'http://somedomain.com/somefile.mp4''); sleep(20); continue my code... What
I want run all script from the directory . Like , The directory contains
Why this code don't work,when i want run this code vwd 2008 express show
I want to run code which needs boost libraries. I built it using CMake.
I have a few dynamic pages and I want to alter certain elements before
I have some javascript code that is used in a few different pages in
We have a few search pages that run against a lot of data and
I want run a script as follows: runner: ssh 'java program &' ssh 'java
I have written php program and uploaded on server. I want run this program

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.