重定向到带有 .htaccess 密码的页面
是否可以将“人”重定向到受密码 .htaccess 保护的网站上的文件夹。
可能通过使用 php 或其他方式,除了“http://user:[email ] ;受保护]”方式?
或者最好只是编写您自己的这些受保护区域的文件夹/文件视图的脚本。
Is it possible to redirect a 'person' to a folder on a website which is protected by a passworded .htaccess.
Possibly by the use of php or otherwise, other than the "http://user:[email protected]" way?
Or is it best just to script your own folder/file view of these protected areas.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
大多数浏览器都会发出有关嵌入的用户名/密码的警告,因为这种链接传统上被垃圾邮件发送者滥用,将他们的阴茎丸 URL 隐藏在“正常外观”链接后面。
如果您想进行自动登录,请使用某种加密令牌进行重定向,受保护的站点可以根据该令牌解密并授予/拒绝访问权限。
以简单的形式:
然后在接收端:
Most browsers will issue warnings about the embedded username/password, as that sort of link has been traditionally abused by spammers to cloak their penis pill URLs behind "normal looking" links.
If you want to do an automatic login, redirect with an encrypted token of some sort that the protected site can decrypt and grant/deny access based on that.
In bare-bones form:
and then on the receiving end: