[英]Redirect/Rewrite after basic authentication
First sorry for my bad English.首先抱歉我的英语不好。
So I have an Openhab system on my raspberry PI with Apache.所以我的树莓派上有一个 Openhab 系统和 Apache。 I have A basic authentication with two groups Admin and Users and I want to redirect Users the open the Landing page to redirect after Loggin with the Basic auth to the UI page.
我有两个组管理员和用户的基本身份验证,我想将打开的登录页面重定向到用户登录后使用基本身份验证重定向到 UI 页面。 The problem is I can't use a PHP script.
问题是我不能使用 PHP 脚本。
So I tried to redirect the Users with the .htaccess所以我尝试使用 .htaccess 重定向用户
.htaccess:
<Location />
RewriteEngine ON
RewriteCond %{REMOTE_USER} =Elias
RewriteRule ^start/index /basicui/app
</Location>
But so it doesn't work and I haven't found anything that I help with this problem但它不起作用,我没有找到任何可以帮助解决此问题的方法
I got the Solution我得到了解决方案
RewriteCond %{REQUEST_URI} ^\/start\/index$
RewriteCond %{REMOTE_USER} =Username
RewriteRule .* http://openhab.clubdrei.com/basicui/app [R=302,L]
RewriteCond %{REMOTE_USER} =Username
RewriteRule .* http://openhab.clubdrei.com/basicui/app [R=302,L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.