Apache:有没有办法在文件匹配中使用远程用户?
用户名:Apache:有没有办法在文件匹配中使用远程用户?,apache,.htaccess,authentication,Apache,.htaccess,Authentication,用户名:foo@foobar.com 那么,允许用户访问以其姓名开头的任何文件的最佳方式是什么呢?(例如foo_bar.pdf、foo.txt、footree.log) #。。。其他身份验证的东西在这里。。。 重写条件%{REMOTE_USER}^(.*)@ 需要有效用户 # ... other authentication stuff here ... RewriteCond %{REMOTE_USER} ^(.*?)@ <FilesMatch "%1.*?\..*">
foo@foobar.com
那么,允许用户访问以其姓名开头的任何文件的最佳方式是什么呢?(例如foo_bar.pdf、foo.txt、footree.log)
#。。。其他身份验证的东西在这里。。。
重写条件%{REMOTE_USER}^(.*)@
需要有效用户
# ... other authentication stuff here ...
RewriteCond %{REMOTE_USER} ^(.*?)@
<FilesMatch "%1.*?\..*">
require valid-user
</FilesMatch>