How can I allow IP in htaccess from Vagrantfile

I am attempting to limit wp-admin access to a specific set of IPs. This works great on the live server, but when viewing locally I am getting a 403 forbidden error.

The site is developed using Vagrant and so I have set the following line in the Vagrantfile

    config.vm.network "private_network", ip: "192.120.33.15"

So in /wp-admin I have the following .htaccess file:

order deny,allow
deny from all
allow from 192.120.33.15

I have attempted many variations and loading multiple IPs with no luck. Any suggestions on how I can gain access when viewing the site locally?

Read more here: How can I allow IP in htaccess from Vagrantfile

Leave a Reply

Your email address will not be published. Required fields are marked *