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

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

More than 1 year has passed since last update.


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

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

<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]

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
Help us understand the problem. What are the problem?