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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:43:04+00:00 2026-05-29T21:43:04+00:00

i have a website that has a simple login form. the form posts to

  • 0

i have a website that has a simple login form.

the form posts to login.php

inside login.php i check for username and password and redirect to a specific page.

All is good until i come across security. From PCI compliance i get this:

All web application communications containing sensitive information should be transmitted using SSL/TLS (HTTPS). If re-direction from HTTP to HTTPS is utilized in an attempt to remediate this finding, please ensure that such re-direction occurs on the server side of the system (for example via the use of the HTTP “Location” header element) and that re-direction is not reliant upon the client (browser) side.

then i went into login.php and added this code at the top:

if (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS']) {
    header("Location: https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
}

If i try to login after this change the login process seems to go through fine, except im not sure that this solved the problem.

notes:
i cant set the website to be: https://www.website.com because this will throw a security warning. I do have a valid certificate though.

any ideas how can i fix this issue?

thanks

edit:

the security warning is about accessing an insecure website, the red rectangle asking me if im sure i want to go to this website and i can add it to the exceptions list

if i add the certificate under m the exception list, this alert happens only once

  • 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-29T21:43:05+00:00Added an answer on May 29, 2026 at 9:43 pm

    Your certificate may be valid, but it’s not recognized by the browser as safe. You need to find out why the browser is saying it’s not valid. Usually it’s either been generated by a company using a root certificate that the browser doesn’t recognize. You may need to switch certificates to get rid of the “red rectangle.”

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

Sidebar

Related Questions

I have an existing, non-framework-based PHP/MySQL website. It has a simple security model, with
I have a website that has a footer. The footer is a simple gray
I have a website that has approx 1000 different strings in a mysql database
I have a website that has a relative path to a stylesheet that looks
I have a public facing website that has been receiving a number of SQL
I have a travel related website that has been online for several years (since
We have a large ASP.Net website that has a single css stylesheet which is
I have an existing website running on IIS6 that has only static HTML pages.
I work at a company that has many clients that have their own website
In my asp.net-mvc website I have a field that usually has a string (from

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.