Cookie 不适用于 WordPress 上受密码保护的页面
最初我在此 问题。
现在,我注意到有些浏览器接受密码,有些则不接受。不同之处?由于某种原因,当我登录管理模块时会生成 cookie,但当我写下访问该页面的密码时却不会生成 cookie,从而迫使它重新加载。
我可以看到为登录创建的 cookie,但看不到密码保护页面的 cookie。
这些情况发生在 Internet Explorer 7 和 8 版本上;虽然只在某些机器上,但大多数都失败了。我已经尝试将 URL 列入白名单,甚至让它接受所有 cookie,但无济于事。
可能是什么原因?如果这可能与上面的问题有关,请帮助我!
提前致谢。
PS:如果您知道另一种无需 cookie 的方法来进行简单的身份验证,请将我链接到它。谢谢。哦,顺便说一句,这是在具有静态 C 类 IP 的 Intranet 内。
Initially I had the issue reported in this question.
Now, what I noticed is that there are some browsers that accept the password, and there are some which don't. Difference? For some reason the cookie is generated when I log in into the Administration module, but it isn't when I write down the password to access the page, forcing it to simply reload.
I can see the cookie created for the log-in, but I can see none for the password-protected Page.
These happens on Internet Explorer, both version 7 and 8; only on some machines, though, but most of them fail this. I already tried white-listing the URL, and even letting it accept ALL cookies, to no avail.
What may be the cause? If perhaps it's got something to do with question above, please help me!
Thanks in advance.
PS: If you know of another, cookie-free method to make a simple authentication, please link me to it. Thanks. Oh, and by the way, this is inside an Intranet with static, class C IPs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您使用的是 Apache 服务器,请考虑使用 WordPress 的此身份验证模块,它允许采用更灵活的方法:
http://wordpress.org/extend/plugins/http-authentication/
这个模块允许您绕过 WordPress 的正常身份验证并使用 Apache 的身份验证 - 所以几乎任何您想使用的身份验证。
您可以在此处找到有关 Apache 身份验证方法的更多信息:
http://httpd .apache.org/docs/1.3/howto/auth.html#database
我已经指出了数据库部分,因为我假设您希望使用数据库进行身份验证。
Assuming you're on an Apache server, consider this authentication module for Wordpress that allows for a far more flexible approach:
http://wordpress.org/extend/plugins/http-authentication/
This module allows you to Bypass WordPress' normal authentication and use Apache's authentication instead - So pretty much any auth you'd like to use.
You can find more information on Apache Authentication methods here:
http://httpd.apache.org/docs/1.3/howto/auth.html#database
I've pointed at the database section as I'm assuming you'll want to use a database to authenticate.