Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 htaccess 密码保护单个 url。(这是我的管理页面)
经过一番研究,我(在stackoverflow上)找到了解决方案:使用SetEnvIf检测URL,然后仅在我们有URL时才询问密码。
我对其进行了测试,但没有成功:每次都询问密码。在与我的主机进行调查后,它们似乎正在运行 LITESPEED(而不是 Apache),并且模块 SetEnvIf 未激活。结果,我被卡住了......我可以做不同的事情吗?
您可以随时尝试使用 PHP 手动执行此操作。AFAIK 不需要服务器配置。