Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache htpassword用于除一个特定url之外的所有传入流量_Apache_.htaccess - Fatal编程技术网

Apache htpassword用于除一个特定url之外的所有传入流量

Apache htpassword用于除一个特定url之外的所有传入流量,apache,.htaccess,Apache,.htaccess,我正在使用htpassword保护我的一台服务器。我想将来自单个子域的流量重定向到另一个域,同时保持所有其他流量的htpassword处于活动状态 我正在努力寻找一个资源与任何信息做这件事,任何人都可以帮助与链接的建议或代码 AuthUserFile /path/to/root/.htpasswd AuthName "Members Only" AuthType Basic # Access Restriction: Require user Administrator [password]

我正在使用htpassword保护我的一台服务器。我想将来自单个子域的流量重定向到另一个域,同时保持所有其他流量的htpassword处于活动状态

我正在努力寻找一个资源与任何信息做这件事,任何人都可以帮助与链接的建议或代码

AuthUserFile /path/to/root/.htpasswd
AuthName "Members Only"
AuthType Basic

# Access Restriction:
Require user Administrator [password]
order deny,allow

您需要为该域创建VirtualHost配置,然后使用 RewriteEngine(RewriteRules RewriteCond)将您的{REQUEST_URI}重定向到另一个url


干杯

您需要为该域创建VirtualHost配置,然后使用 RewriteEngine(RewriteRules RewriteCond)将您的{REQUEST_URI}重定向到另一个url

干杯