Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 191.164.1.xxx (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 superuser.com May 7 '12 at 6:27

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

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. old.tamasrepus.hotnudiegirls.com/pages/… – 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.