Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

200
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda