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

201
Visualizações
.htaccess - Allow IP range with authentication & bypass for one page

I'm struggling with a .htaccess file to accomplish the following:

I have a subdomain with our admin console in

  • Grant access to /pagecheck/ from any IP without authentication (health check script)
  • Block access to all other resources from any IP that is not on our list of approved IPs
  • Request HTTP authentication popup for any allowed IPs

I'm struggling to block access from "outside" IPs as I can't seem to get the reordering right.

This is the code that works for /pagecheck/ and authentication:

SetEnvIfNoCase Request_URI "^/pagecheck/" noauth

AuthName "Admin Area"
AuthType Basic
AuthUserFile /home/production/.htpasswd
require valid-user

Order Deny,Allow
Deny from all
Allow from env=noauth
Satisfy any
DirectoryIndex index.cgi
Options -Indexes

However, I'm struggling to get the logic in the right place to only allow access from our office IP address range. I think it is conflicting with the different Orders and the authentication.

Could anyone help? Thanks

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