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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:37:38+00:00 2026-05-27T11:37:38+00:00

I want to force ssl access on an entire site, except for the following

  • 0

I want to force ssl access on an entire site, except for the following pages:

  • www.example.com/loans_and_lines/home_loans.html www.example.com/cards
  • www.example.com/cards/international-ministries.html
  • www.example.com/cards/international-ministries/donation-3.html
  • www.example.com/locations_and_contacts/

Force ssl:

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/personal/loans_and_lines/home_loans\.html
RewriteCond %{REQUEST_URI} !^/cards/$
RewriteCond %{REQUEST_URI} !^/cards/international\-ministries\.html
RewriteCond %{REQUEST_URI} !^/cards/international\-ministries/donation\-3\.html
RewriteCond %{REQUEST_URI} !^/locations_and_contacts/$
RewriteRule (.*) https://www.example.com$1 [R=301,L]

However neither of the /cards or /locations_and_contacts and any of the pages are being excluded from being served with ssl access. Can someone tell me what’s wrong with my set of rules?

  • 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-27T11:37:39+00:00Added an answer on May 27, 2026 at 11:37 am

    🙂

    …

    You forgot the “OR” directive. Here’s what should work (and maybe you’ve forgotten the QSA directive in the redirect as well (maybe not)):

    # Force SSL
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} !^/personal/loans_and_lines/home_loans\.html [OR]
    RewriteCond %{REQUEST_URI} !^/cards/$ [OR]
    RewriteCond %{REQUEST_URI} !^/cards/international\-ministries\.html [OR]
    RewriteCond %{REQUEST_URI} !^/cards/international\-ministries/donation\-3\.html [OR]
    RewriteCond %{REQUEST_URI} !^/locations_and_contacts/$
    RewriteRule (.*) https://www.example.com$1 [QSA,R=301,L]
    

    Two hints:


    Please try to use the RewriteLog directive: it helps you to track down such problems:

    # Trace:
    # (!) file gets big quickly, remove in prod environments:
    RewriteLog "/web/logs/mywebsite.rewrite.log"
    RewriteLogLevel 9
    RewriteEngine On
    

    My favorite tool to check for regexp:

    http://www.quanetic.com/Regex (don’t forget to choose ereg(POSIX) instead of preg(PCRE)!)

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

Sidebar

Related Questions

I'm trying to force SSL on my site. I want to have a ring
I want to force www. on my URLs (e.g. http://domain.com becomes http://www.domain.com ). However,
I am working on a site that only owns an SSL cert for domain.com.
I am trying to build a html table but I want to force all
I have an SSL certificate for the 'www' subdomain of a web site we'll
I want to force push, for example, my tag 1.0.0 to my remote master
I want to force a repaint during a Javascript loop. For example: var s
I want to force my view to go for landscape, just when I call
I want to force user to download images. Not open in browser. It is
I want to force the download of an image. I have found this code:

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.