Block By X-Forwarded-For In .htaccess

To block access except for a single IP address in the .htaccess file the code is:

If you’re behind a load balancer then you have to use the X-Forwarded-For header instead:

 

Have a project or a problem?

Talk with a senior engineer for practical recommendations—no obligation.

Leave a comment

Leave a Reply

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

Related Posts

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.