Forums

[resolved] Admin Redirect On Subdomains (9 posts)

  1. Chris Collins
    Member
    Posted 6 months ago #

    I have subdomains configured on my site http://www.domain.com. I can access http://www.domain.com/wp-admin fine. However if I go to sub.domain.com/wp-admin

    it sends me to this page

    http://sub.domain.com/wp-login.php?redirect_to=http%3A%2F%2Fsub.domain.com%2Fwp-admin%2F&reauth=1

    It never allows me to login to the wp-admin on a subdomain. However I can visit the page with no problem. The users cannot access their dashboard as well.

  2. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 6 months ago #

    What's in your .htaccess?

  3. webmasterstq
    Member
    Posted 6 months ago #

    I am facing similar issue with a slight difference. If I go to sub.domain.com/wp-admin, a 404 page is returned. Kindly suggest.
    The .htaccess file is as under;

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

  4. Chris Collins
    Member
    Posted 6 months ago #

    I actually found out what was causing my issue. The Cookie Hash for the main site was declared in wp-config.php. Removing the cookie hash in the wp-config.php fixed the issue.

  5. webmasterstq
    Member
    Posted 6 months ago #

    I am still facing the issue. Can anyone assist me ?
    Thanks in advance.

  6. Chris Collins
    Member
    Posted 6 months ago #

    Have you tried to setup a wildcard domain at your host?

    http://codex.wordpress.org/Create_A_Network#Step_2:_Setting_Wildcard_Subdomains

  7. webmasterstq
    Member
    Posted 6 months ago #

    I am unable to find httpd.conf file or the include file containing the VHOST entry on my host (GoDaddy.com). However, I have added a wildcard domain in my DNS record.

    Can I configure .htaccess file for "ServerAlias" entry ?

  8. Chris Collins
    Member
    Posted 6 months ago #

    You really might be better off calling godaddy and asking their solution for Server Alias configuration. Each host will have its own procedure. ServerAlias is possible through .htaccess but not really recommended.

  9. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 6 months ago #

    webmasterstq - You may be able to do that in cpanel, if GoDaddy has it, but IIRC you can't wildcard map domains on entry level hosting there.

    You officially have a different problem. And this, friends, is why I tell you 'Unless you have EXACTLY the same, 100% certain, problem, please make your own post.'

    Chris, I'm marking this resolved since you are.

Reply

You must log in to post.

About this Topic