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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:05:25+00:00 2026-05-19T01:05:25+00:00

I am trying to catch any https traffic to the front of my site

  • 0

I am trying to catch any https traffic to the front of my site so:

https://www.domain.com

is redirected to:

http://www.domain.com

However other subdomains need to be redirected elsewhere. For the most part this is all working, apart from the https -> http redirection. Here’s my .htaccess file at the moment:

RewriteEngine On

RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

RewriteCond "%{HTTP_HOST}" !^www.* [NC]
RewriteCond "%{HTTP_HOST}" ^([^\.]+).*$
RewriteRule ^(.*)$ https://secure.domain.com/a/login/%1 [L,R=301]

It would seem that this bit:

RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

isn’t working as I would imagine. In fact it doesn’t seem to redirect at all.

In another subdirectory I have the opposite in effect which works fine:

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

so my thinking is the opposite should have done the job, but seemingly not.

Any thoughts anyone?

EDIT

I’m thinking that this could have something to do with the fact that on the server there is an ssl cert which the ISP uses to provide a generic https address to your site. For example if you have a site at:

http://www.yourdomain.com

You can access the same content/hosting account over https by using:

https://server100.securedomain.com/yourdomain.com

Could it be that because when I type in https into the browser I’m being served the generic cert and because it doesn’t match the domain name I’ve entered I’m getting a security warning about an untrusted cert which is stopping the redirection?

EDIT 2

Looking at the server headers I think I am correct with my above assumption. The server is returning:

The host name in the certificate is invalid or does not match

Would this stop the redirection?

  • 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-19T01:05:26+00:00Added an answer on May 19, 2026 at 1:05 am

    Just realised that I never closed this off, so for the benefit of anyone else trying to solve this I will now.

    In short, the catch all https -> http redirection that I was trying to achieve won’t work because the server is serving up the cert first which is then generating the security warning. This happens before the redirect for obvious security reasons, hence the redirect not working a I wanted.

    Hope that helps somebody else.

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

Sidebar

Related Questions

I'm trying to download the following page: http://structureddata.wikispaces.com/Test wget without any option fails: wget
I'm trying to parse the following URI : http://translate.google.com/#zh-CN|en|你 but got this error message
I'm trying to catch a ClassCastException when deserializing an object from xml. So, try
In C++, I'm trying to catch all types of exceptions in one catch (like
I'm trying to build a Java regular expression to match .jar! The catch is
I am trying to make a custom HTTP 404 error page when someone types
I'm trying to catch hardware key press events on Windows Mobile 6.x with .NET
I'm trying to POST a http request using ajax, but getting a response from
i am trying to develop an app which tries to call a https(godaddy ssl)
I’m trying to read the HTTP response code from a remote server but am

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.