Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Can’t login with long url-redirected

Discussion in 'Misc WordPress Requests' started by xtimedt69, Nov 28, 2017.

  1. xtimedt69

    Guest

    Can’t login with long url-redirected, by xtimedt69

    I installed wordpress in a sub-directory on my server, then used the .htaccess file code to redirect to my install. That part works fine. However, whenever I try to go to the wp-admin it automatically adds a redirect and creates a long url:

    http://www.strandzandthreadz.com/wp-admin.php becomes:

    http://www.strandzandthreadz.com/wp...andthreadz.com/strandz2017/wp-admin/&reauth=1

    The long URL will not allow me to login and I have to shorten the URL to:

    http://www.strandzandthreadz.com/wp-login.php

    I have no problem using the workaround, but my users are baffled by it and give up.

    I got on with my service provider to try to fix this and they said they can’t fix it, it is a wordpress problem and they referred me to this support forum.

    I got the .htaccess code for redirect as suggested by worpress documents:

    # .htaccess main domain to subfolder redirect
    # Copy and paste the following code into the .htaccess file
    # in the public_html folder of your hosting account
    # make the changes to the file according to the instructions.

    # Do not change this line.
    RewriteEngine on

    # Change yourdomain.com to be your main domain.
    RewriteCond %{HTTP_HOST} ^(www.)?strandzandthreadz.com$

    # Change 'subfolder' to be the folder you will use for your main domain.
    RewriteCond %{REQUEST_URI} !^/strandz2017/

    # Don't change this line.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # Change 'subfolder' to be the folder you will use for your main domain.
    RewriteRule ^(.*)$ /strandz2017/$1

    # Change yourdomain.com to be your main domain again.
    # Change 'subfolder' to be the folder you will use for your main domain
    # followed by / then the main file for your site, index.php, index.html, etc.

    RewriteCond %{HTTP_HOST} ^(www.)?strandzandthreadz.com$
    RewriteRule ^(/)?$ strandz2017/index.php [L]

    Can’t login with long url-redirected
     
    #1

Share This Page

Web Hosting