mod_rewrite を使用して /controller を /index.php?controller=%controller% にリダイレクトする htaccess ファイルがあります。
このような:
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# Rewrite current-style URLs of the form 'index.php?controller=x&action=y'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?controller=$1 [L,QSA]
</IfModule>
今、私ができるようにする必要があるのは、コントローラーの 1 つを HTTP 認証で動作させることです。これが最善の方法かどうかを尋ねているのではなく、単にどうすればよいかを尋ねているだけです。
例:
http://www.example.com/ - It requires no auth
http://www.example.com/secret - requires auth