Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!