使用 htaccess/htpasswd 保护单个 Wordpress 页面
我有一个优质内容 WordPress 页面,我正在尝试“保护”。我目前在非 cms html 网站上使用第 3 方 .htaccess/.htpasswd 系统来保护类似内容。有没有办法让单个 WordPress 页面受到第三方 .htaccess/.htpasswd 系统的保护?
我搜索过但找不到使用第三方会员系统而不是自己的会员插件。我也无法使用管理中的页面保护功能,因为我再次需要使用 .htaccess/.htpasswd 系统。
预先感谢您提供的任何帮助。
I have a premium content Wordpress page I am trying to 'protect'. I have a 3rd party .htaccess/.htpasswd system I am currently using on a non-cms html site to protect similar content. Is there a way to make an individual Wordpress page protected with a third party .htaccess/.htpasswd system?
I've searched for, but cannot find, a memberhip plugin that would use a third party member system instead of its own. I also cannot use the page protect feature in admin as again I need to use the .htaccess/.htpasswd system.
Thank you in advance for any assistance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是,这不起作用。
我输入 testblog.mysite.com/test-paid-gallery,然后 WordPress 页面就会出现,而无需询问用户/密码。在研究一些东西时,似乎
Unfortunately this is not working.
I type in testblog.mysite.com/test-paid-gallery and the wordpress page comes up without asking for user / password. In researching some stuff it appears the
要保护一页,请将以下内容添加到 .htaccess(或 htaccess.txt)中,
只需更新 .htpasswd 文件的路径和页面名称即可。
编辑 7/31/2013
当时,这适用于我正在使用的环境。根据服务器设置,实际脚本可能会有所不同。如所附网址所示,不同的托管公司有两个相似但不同的脚本。如果您需要特定脚本,请检查您的托管常见问题解答/支持部分
http://www.inmotionhosting.com/support/website/htaccess/password-single-file-htaccess
http://support.hostgator.com/articles/cpanel/how -密码保护一个文件
To protect one page you add the following to .htaccess (or htaccess.txt)
Just update the path to your .htpasswd file and name of page.
Edit 7/31/2013
At the time this worked on environments that I was working with. Depending on server setup the actual script can vary. As attached urls show there are two similar but different scripts for different hosting companies. If you require a specific script, please check your hosting FAQ/Support section
http://www.inmotionhosting.com/support/website/htaccess/password-single-file-htaccess
http://support.hostgator.com/articles/cpanel/how-to-password-protect-one-file