Answer the question
In order to leave comments, you need to log in
How to properly configure the htaccess file in the site.ru/wp-admin directory?
I want to allow access to the administrative panel strictly at the specified ip-addresses. To do this, I create an additional .htaccess file in the site.ru/wp-admin directory, in which I write the following entries (of course, I enter my real addresses) in UTF-8 encoding:
order deny, allow
allow from ip-address-1, ip-address -2
deny from all
After saving and restarting the server, the site itself on the site.ru domain and the entries on it are displayed correctly, but the Wordpress admin panel is not displayed. When I try to access the site.ru/wp-admin link, I get the following error:
403 Forbidden
You don't have permission to access /wp-admin/ on this server.
Apache/2.2.15 (CentOS) Server at site.ru Port 80
Where is the mistake? Maybe at the beginning of the .htaccess file, you should also add a standard entry like this:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question