Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
11
Help us understand the problem. What are the problem?

More than 1 year has passed since last update.

@wokamoto

[WordPress][Nginx] プラグイン SiteGuard のログインURL変更機能を Nginx で使う

SiteGuardってプラグインのログインURL変更機能を使うと、.htaccess に以下の設定が追加されます。
login-xxxx はプラグインの設定画面で設定したログイン用のURL。

#SITEGUARD_PLUGIN_SETTINGS_START
#==== SITEGUARD_RENAME_LOGIN_SETTINGS_START
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    RewriteRule ^wp-signup\.php 404-siteguard [L]
    RewriteRule ^wp-activate\.php 404-siteguard [L]
    RewriteRule ^login-xxxx(.*)$ wp-login.php$1 [L]
</IfModule>
#==== SITEGUARD_RENAME_LOGIN_SETTINGS_END
#SITEGUARD_PLUGIN_SETTINGS_END

Webサーバが Nginx の場合は、.htaccess が有効にならないので、以下のような感じで設定追加しましょう。
単純に Nginx の rewrite に書き換えただけ。

rewrite ^/wp-signup\.php$ /404-siteguard break;
rewrite ^/wp-activate\.php$ /404-siteguard break;
rewrite ^/login-xxxx(.*)$ /wp-login.php$1 break;
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
11
Help us understand the problem. What are the problem?