1
我有一个网址www.mywebsite.com/admin
,我想用这个阿帕奇保护和重写
AuthType Basic
AuthName "Restricted Files"
# (Following line optional)
AuthBasicProvider file
AuthUserFile /usr/local/apache/passwd/passwords
Require user SomeUsername
不过,该网站使用自定义的框架,以便/admin
获得通过index.php
通过密码保护它,所以没有实际一个admin
文件夹,所以我不能把它放在一个.htaccess文件中。我如何使用上述代码保护该网址?
那会刚进去我的根目录下的.htaccess文件? –
现在就把它放在那里,就像一个魅力,谢谢:) –
不客气,很高兴它解决了。 – anubhava