Restricting ALL /administrator folder
April 22, 2013 04:51AM
Hello Everybody,

I need some help ...
Currently I am allowing authentication to the /administrator folder by (and this working fine for me):

location /administrator {
<tmpl_var name='web_document_root_www_proxy'>
index index.html index.php;
auth_basic "Members Only";
auth_basic_user_file <tmpl_var name='stats_auth_passwd_file'>;
}

However, the problem with that is if a user installs say Joomla in a subfolder within root eg

/joomla/ then that setting does not take effect.

I would like to take effect to any administrator folder accessed via the web regardless of the folder level .

Ie,

www.domain.com/administrator
www.domain.com/joomla/administrator
www.domain.com/joomla/site2/administrator

and etc ..

ALL those should be authenticated based on my .htaccess file defined above.

Please advice me on how I can modify the above directive to support that ...
Re: Restricting ALL /administrator folder
July 08, 2013 01:27AM
No one has an answer to this question totally?
Re: Restricting ALL /administrator folder
July 08, 2013 03:25AM
I think I was able to figure it out ...

I have used:

location ~*/(admin|administrator|wp-admin) {
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 254
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready