Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm looking to secure my phpMyAdmin dir from being accessed from other IPs than my own, albeit dynamic IP, let's say it is (xxx = being dynamic numbers).

Referring to the Apache directive allow from in .htaccess files, can I define only the first static numbers in order to allow anything starting with the defined IP numbers and let it accept any numbers in the same fashion a wildcard works in other contexts?

E.g. would would something like this work? : allow from 191.164.1.

share|improve this question

migrated from May 7 '12 at 6:27

This question came from our site for computer enthusiasts and power users.

1 Answer 1

up vote 2 down vote accepted

Yes, if your subnet mask is then:

    allow from

Will allow all hosts in that subnet.,,

share|improve this answer
Thanks. Just a dumb question, the ending 24, should be 254, right? – Henrik Apr 30 '12 at 15:01
No. That is CIDR notation. It is based off your network mask. You can cross reference yours with this list.… – dennis.hempler Apr 30 '12 at 15:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.