• Hi Greg,

    Thank you for this helpful plugin, but it seems that it does not work when WP is installed into a subdirectory.
    My problem is similar to this one: https://www.ads-software.com/support/topic/cannot-login-htaccess-properly-written/.

    This is my config:

    • wp/ folder contains all WordPress core files.
    • The URL of the admin panel is domain.com/wp/.
    • The site URL is domain.com.

    With this configuration, I have two .htaccess: one in the root directory and another one in the WordPress directory (wp/ in my case) with the default rewrite rules of WP into each one.

    When the plugin is activated, it writes these rules into the root directory one:

    
    # BEGIN SF Move Login
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteRule ^wp/postpass/?$ /wp/wp-login.php?action=postpass [QSA,L]
        RewriteRule ^wp/logout/?$ /wp/wp-login.php?action=logout [QSA,L]
        RewriteRule ^wp/lostpassword/?$ /wp/wp-login.php?action=lostpassword [QSA,L]
        RewriteRule ^wp/resetpass/?$ /wp/wp-login.php?action=resetpass [QSA,L]
        RewriteRule ^wp/register/?$ /wp/wp-login.php?action=register [QSA,L]
        RewriteRule ^wp/login/?$ /wp/wp-login.php [QSA,L]
    </IfModule>
    # END SF Move Login
    

    But as the .htaccess in the WordPress directory is processed first, these rules are not taken into account and there is a 404 or an error message all the time.

    After some tests, the rewrite rules of the plugin should be into the .htaccess in the WordPress directory instead of the other one like this:

    
    # BEGIN SF Move Login
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^postpass/?$ wp/wp-login.php?action=postpass [QSA,L]
    RewriteRule ^logout/?$ wp/wp-login.php?action=logout [QSA,L]
    RewriteRule ^lostpassword/?$ wp/wp-login.php?action=lostpassword [QSA,L]
    RewriteRule ^resetpass/?$ wp/wp-login.php?action=resetpass [QSA,L]
    RewriteRule ^register/?$ wp/wp-login.php?action=register [QSA,L]
    RewriteRule ^login/?$ wp/wp-login.php [QSA,L]
    </IfModule>
    # END SF Move Login
    

    when you use this kind of installations.

    Hope this issue contributes to your plugin,
    Xavier.

  • The topic ‘Does not work when WP is installed into a subdirectory’ is closed to new replies.