troubleshooting Question

IP Blocking URLs on Apache

Avatar of equentin
equentin asked on
Apache Web Server
1 Comment1 Solution259 ViewsLast Modified:
I have a site which has has an admin area located at and an api area located at

I need to lock down the whole site by ip address except urls starting with /api.

The site is hosted on an apache server and I am using the CakePHP framework which I believe uses mod_rewrite to manage its urls. i.e. there is no physical /api directory.

Is there a way to set up IP Blocking with .htaccess or in the httpd.conf to work for this setup?

Many thanks,

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros