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

203
Vistas
Use htaccess to restrict by IP, but unrestrict one directory

I am trying to restrict access to a domain to one IP address, but allow anyone to access one directory within that domain. So I have this in my .htaccess (in web root):

<RequireAll>
    Require ip xx.xx.xx.xx
</RequireAll>

which is working great to restrict access, but then when I want to allow unrestricted access to /folder within the root, so I tried:

<Directory "/home/*/public_html/folder">
 Allow from All
 Satisfy Any
</Directory>

but then I get a 500 error. So how would I accomplish this? And why the 500?

Also, for reference, here's the rest of the htaccess, which routes all requests to the index.php

# Remove ".php" from path
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

Options +FollowSymLinks

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d

RewriteRule ^.*$ ./index.php

Thanks!

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