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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:37:08+00:00 2026-05-29T10:37:08+00:00

I need help with users accessing my site via HTTPS. I only want to

  • 0

I need help with users accessing my site via HTTPS. I only want to have 2 pages able to be accessed via HTTPS. All other pages should be accessed HTTP only and if the user tries to access the page via HTTPS it will redirect them to the HTTP version of that page. I have tried several .htaccess files but I cannot seem to get any of them to work.

Any help is greatly appreciated!

  • 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-29T10:37:09+00:00Added an answer on May 29, 2026 at 10:37 am

    Couple of different ways:

    1. You could either place some logic in the 2 pages (enroll.php and Registered.php) to redirect to HTTPS.

      if ($_SERVER['HTTPS']!=”on”)
      {
          $redirect= “https://”.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
          header(“Location:$redirect”);
      }
      
    2. Assuming you are using Apache Web Server (other web servers including IIS are fairly similar with redirect mechanism), you can employ pattern matching and for these two URLs, specify a redirect to HTTPS.

      RewriteEngine On
      RewriteCond %{HTTPS} !on
      RewriteRule (enroll.php) https://%{HTTP_HOST}%{REQUEST_URI}
      RewriteRule (Registration.php) https://%{HTTP_HOST}%{REQUEST_URI}
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I posted a detailed question here: https://stackoverflow.com/questions/4252194/need-help-closing-accessing-my-views-in-a-simple-app-included-an-img-of-my-progr but I might have been too confusing.
I need help rewriting online.php to -> /users/online and profile.php?id=3426 to -> /users/3426 and
i need help how to organize nodes of drupal cms. i have three kind
I need help, I need to make a menu that only shows when you
for some days i have been struggeling with making only certain ips accessing my
i need help with disk_total_space function.. i have this on my code <?php $sql=select
I need some help in coding this in C# I have a list of
I need help with writing a query (mySQL) to Total number of users in
I need help in trimming a string url. Let's say the String is http://myurl.com/users/232222232/pageid
I need help designing an algorithm for recommendations on movies. Every user in the

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.