我想打一些網頁使用密碼保護的htpasswd的如何配置的htpasswd與htaccess的
我該怎麼辦呢?
# Do the regex check against the URI here, if match, set the "require_auth" var
SetEnvIf Request_URI ^/product-category/ require_auth=true
# Auth stuff
AuthUserFile /home1/thetimh6/public_html/htpasswd
AuthName "Password Protected"
AuthType Basic
# Setup a deny/allow
Order Deny,Allow
# Deny from everyone
Deny from all
# except if either of these are satisfied
Satisfy any
# 1. a valid authenticated user
Require valid-user
# or 2. the "require_auth" var is NOT set
Allow from env=!require_auth
我嘗試在我的htaccess的文件,但它顯示我
500服務器錯誤
你不應該將.htpasswd文件放在public_html中!!! – kingtut007
你可以給我一個代碼如何使用.htpasswd? –
請看下面..... – kingtut007