Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

199
Visualizações
Securing a folder and redirecting it to HTTPS

Trying to secure a folder with .htaccess First I want all requests to that folder to redirect to https then to ask the user for a password.

My .htaccess file that's in the root of the protected folder looks like this

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

AuthUserFile "/etc/somewhere/.htpasswd"
AuthType Basic
AuthName "Protected"
require valid-user

I get asked for a password - but the https redirection does not work So if I try www.domain.com/folder the auth box comes up with user/pass request but it stays in http... I want it to first go into https mode then ask for a password.

Ay reason why this is not working ?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda