Viewing 6 replies - 1 through 6 (of 6 total)
  • @drummerbran,

    Are you running the standard WordPress .htaccess rewrite, or something custom? Here is the standard for reference:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    If your .htaccess file has any more code than these few lines then it’d be a good idea to start digging through it. Also curious, do you have force SSL for admin set in wp-config.php?

    Thread Starter drummerbran

    (@drummerbran)

    Hi @littlepackage

    Thaks the quick response. No, I don’t have the default htaccess code because WP had me put in different code when I set up the multisite. The other code is from SG Optimizer or gzip.

    As for force SSL for admin, no I don’t. Should I?

    • This reply was modified 6 years, 6 months ago by drummerbran.

    @drummerbran,

    Not necessarily, no. I assume https:// pages load SSL. Are you using a plugin like Really Simple SSL by chance?

    But anyway, assuming your settings are copacetic, I’ve had this problem before and ended up being database issue. Try repairing your DB tables. Meanwhile, I’m trying to drum up the exact fix in my head if that isn’t it.

    Thread Starter drummerbran

    (@drummerbran)

    I’ve been doing some research and I think I may have found something that worked. Maybe this is the solution you had?

    I inerted this code into .htaccess and obvisouly rep-laced my own dowmin. Bu is seems to be working.

    #Force non-www:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
    RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]

    @drummerbran,

    If your site is listed as https://example.com in the WP -> General Settings “Site Address” & “WordPress Address,” it doesn’t seem like you’d need that unless something was fishy with rewrites somewhere else (I suspect SG). But if it works, yay!

    Now that I think about it more, I still think it’s something with SSL, .htaccess, and wp-config. Take a look at this: https://wordpress.stackexchange.com/a/250254 – since you’re using the SiteGround plugin which has SSL settings…

    Make sure to clear caches!

    Hi, I am facing the same problem. I tried to change entries 2 areas as below

    .htaccess
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #RewriteCond %{HTTPS} !=on
    #RewriteRule ^ https://%{www.urjatrust.org}%{REQUEST_URI} [L,R=301]

    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    And commented out as above after it did not work

    wp-config.php
    define(‘FORCE_SSL_ADMIN’, true);

    Later I commented out

    when I type below url
    https://example.com/wp-admin

    it automatically changes to
    https://wp-admin

    Now Admin access is not available and not sure how to restore. Request immediate suggestions

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Domain with www. redirects to wp-admin’ is closed to new replies.