1

I would like to protect a "friendly url" that i have in my htaccess file. Just to be a little bit more clear, i have these rule:

RewriteRule ^([a-z|A-Z|0-9|\/|\-|\_]+)$ index.php?page=$1

That redirects url/test/hello to index.php?page=test/hello

What i would like to do is, for example, when a certanin url is given (for example, url/text/hello),

url/institucional

the browser prompts a user and password dialog, the same way you can do with directories in the htacces file.

I've tried with:

<LocationMatch "/institucional">
     AuthType Basic
     AuthName "Padres Secundaria"
     AuthUserFile /url/to/file.passwd
     Require valid-user
</LocationMatch>

But it gives me a 500 error page.

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • Try it without the quotes around /institucional. Looking at the docs, they don't have quotes around the pattern for this type of directive. – Wige Dec 14 '12 at 19:48

0 Answers0