Apache Restrict Access to Specific URL Based on IP
I have a wordpress multi-site server running on Ubuntu. I need to restrict access to two of the wordpress sub-sites to a specific subnet. For example:
http://www.mywp.com/jobs http://www.mywp.com/apples These two subsites are only access via 192.168.*.* ( or in CIDR notation 192.168.0.0\16), and 104.113.*.* I have explored many options the most promising is the apache mod_rewrite approach; however, I have found that rewriting works for directories. Wordpress doesn't have a typical tree stucture, i.e. http://www.mywp.com/jobs doesn't correspond to /var/www/jobs, and in fact http://www.mywp.com/jobs doesn't have a single file or directory representation at all. Thus thus there is no corresponding .htaccess file for /jobs. I don't see how to attach a URL instead of a directory to the rewrite rule. Here are the rewrite concepts I have been playing with: Code:
<IfModule mod_rewrite.c> Code:
<Limit GET POST PUT> |
Have you tried Location match?
|
Quote:
Code:
<Location /jobs> |
All times are GMT -5. The time now is 12:16 AM. |