0

I have a php script that relies on the following rewrite rules:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/script.*$ [NC]
RewriteRule (.*)$ script.php/go [QSA,L]

So when someone visits http://example.com/foo, the script is called script.php/foo. This should be publicly visible.

When I visit http://example.com/script.php/adminstuff/ I'd like to use http basic authentication. (I know how to use this in the basic case.) How will this react with the rewrite rules above?

Thanks.

bstpierre
  • 431
  • 1
  • 3
  • 14

1 Answers1

0

You couold use <Location> tag:

<Location http://example.com/script.php/adminstuff/>
      AuthType xxxx
      ...
</Location>

Rianto Wahyudi
  • 493
  • 3
  • 11
  • Is there something analogous that can be used in an .htaccess file? If not I can use this recipe, but I'd prefer to have it in .htaccess. Thanks. – bstpierre Dec 21 '09 at 13:24