0

I want to set an htpasswd for all URLs that match a pattern. Specifically I want to set it for all URLs that start with '/admin.php?' except those which contain the string 'useradmin'.

Is this possible?

Duncan Marshall
  • 530
  • 1
  • 6
  • 15
  • It's possible. You could give us some sample code of your file and some examples would be nice, so we don't have to spend the majority our time thinking of use cases. Don't be afraid to give it a try too so it's easier for us to help you. – Andris Leduskrasts Jul 10 '15 at 07:21
  • At the moment there is no code. I've tried various examples online, but can't find one that works. I can password protect whole directories, or specific URLs, but not ones that match a pattern. – Duncan Marshall Jul 10 '15 at 07:28
  • 1
    You sure? http://stackoverflow.com/a/14605066/4635642 seems to contain the pattern requirement. You'd need a more complicated regex, of course. – Andris Leduskrasts Jul 10 '15 at 07:33

0 Answers0