• hi~i had some trouble.i can’t login the wp-admin in the Sub-directories mode when i finish the note of setup config(wp-config and .htaccess).my sever is iis7.0 and support rewrite.password and name is correct.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Can i please confirm, are you attempting to run a WordPress Multisite installation? If so continue reading, if not then please provide more information before taking the below advice.

    I had the same problem today and i changed two things which fixed it. In my .htaccess file there seemed to be a small error

    Firstly I set my permalinks to default, then Day and Month, and then to Post Name – this prompts WordPress to re-write the .htaccess file.

    Secondly In my .htaccess file I had to change it from this:

    <IfModule mod_rewrite.c>
    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]</IfModule>
    
    # END WordPress

    to this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress

    Notice how i moved </IfModule> down one line, and then removed the white space in-between START & END WordPress. I have no idea if this was the root cause of the problem, but it worked.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    my sever is iis7.0 and support rewrite.password and name is correct.

    Which rewrite? IIS’s mod whatever it is or .htaccess?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sub-directories can't login wp-admin’ is closed to new replies.