在wordpress上的htpasswd

时间:2012-03-24 10:47:53

标签: wordpress .htaccess .htpasswd

我正在尝试开发基于wordpress的网页,我已经完成了许多本地化,但是想要尝试在云上制作,但希望使用.htpasswd进行关闭页面访问。

我阅读了很多文章,并按照以下步骤操作:

insatlling wordpress..etc

在第2点,我尝试了几件事:

在根上创建一个手动.htacces并放置:

<Files .htaccess> 
order allow,deny  
deny from all  
</Files>

<IfModule mod_rewrite.c>  
RewriteEngine On  
RewriteBase /  
RewriteCond %{REQUEST_URI} ^/directoryname1/(.*)$ [OR]  
RewriteCond %{REQUEST_URI} ^/directoryname2/(.*)$ [OR]  
RewriteCond %{REQUEST_URI} ^/failed_auth.html$  
RewriteRule ^.*$ - [L]  
</IfModule>  

# BEGIN WordPress  
<IfModule mod_rewrite.c>  
RewriteEngine On  
RewriteBase /  
RewriteCond %{REQUEST_FILENAME} !-f  
RewriteCond %{REQUEST_FILENAME} !-d  
RewriteRule . /index.php [L]  
</IfModule>  
# END WordPress  

AuthName "Texto al gusto"  
AuthUserFile /test/.htpasswd  
AuthType basic  
Require valid-user  

或者使用一些插件来编辑htacces,因为我可能正在删除一些上传我的。

我试图删除一些关于htacces的parragrahps,wordpress因为我没有永久链接活动,以及其他。

我把htpasswd放在测试文件夹上并且都正确。

我实现了我的网页并显示了htacces的弹出窗口,我把用户传递然后......总是出现这个......

Internal Server Error  

The server encountered an internal error or misconfiguration and was unable to complete your request.  

Please contact the server administrator, webadmin@kundenserver.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.  

More information about this error may be available in the server error log.  

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.  

0 个答案:

没有答案