Jurist Posted January 4, 2017 Share Posted January 4, 2017 Hello, How to properly edit .htaccess for subdomain to make it allow connections only from specific ip addresses? when I add: Order Deny,Allow Deny from all Allow from xx.xxx.xxx.xx Allow from xx.xxx.xxx.xx only part of website is blocked. I have test site in: sub.mydomain.com and it reads part of code from production store which is on: www.mydomain.com How do I make every resource loaded from www.mydomain.com be first redirected to sub.mydomain.com and then be checked for permissions? I think I should add condition which redirects no matter what, www or nonwww http or https to https://sub.mydomain.com This should also resolve problem with redirect chains. I will appreciate any reply. Link to comment Share on other sites More sharing options...
Jurist Posted January 19, 2017 Author Share Posted January 19, 2017 Okay so I've managed to sort this out: My php interpreter was cgi and I needed to install FPM to make .htaccess rules actually work. After installing proper package and switching site to use FPM .htaccess deny allow works as intended. Hope that helps anyone. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now