After logout i am redirecting to a wrong page?

Hello Admin,

After logout i am redirecting to a wrong page?

I mean i am actually inside my account, then i clicked the "LOGOUT" then i redirected to the wrong site, which is i don't want to happen.

This is the link after clicking the "logout" : http://blog.prosper8dotcom.com/blog.prosper8dotcom.com/home

My question is... after i click the "LOGOUT" button, i want to redirect to this page:
http://blog.prosper8dotcom.com/

Please help me to resolve this issue.

Thanks a lot.

  • Predrag Dubajic

    Hi David,

    Thanks for granting access, I have checked your site and saw one strange thing event before logging out.
    I tried creating new account on your site to test logout with that account but I soon as I clicked on Create Account I was switched from super admin account to that new account, basically it logged me out of admin and logged in with new account automatically which is not something that should happen.

    I didn't see any redirects in your active plugins or theme so I'm thinking this could be some .htaccess rule causing this.

    Can you tell me which rules you have in your .htaccess and can you try using default .htaccess rules to see if it's working normally after that?
    You can find default rules for multisite here:
    https://codex.wordpress.org/htaccess

    Best regards,
    Predrag

  • David

    Please guide me if ever a step by step procedure on how to do this in the htaccess.

    Coz i want also to learn the step by step guide.

    If there is a kind of video tutorial which is really very very great. Coz i can follow exactly how it teaches.

    honestly since i subscribe to WPMU DEV, this kind of login and logout usually my big big question mark on my mind, coz i really think that it's not right and not proper.

    I thank you because you already discovered what i wanted to say since i subscribed here.

    This was really giving me trouble ever since, but i just ignore, coz i want to solve by studying, but i couldn't.

    Thank you so much.

  • Predrag Dubajic

    Hi David,

    Sure thing, there's nothing complicated here.

    What you need to do is access your WordPress installation via FTP and navigate to your main WP folder.
    In there you should see wp-content, wp-admin, wp-includes folders and bunch of some other files.
    Now find file called .htaccess and download it to your PC.
    Create a copy/backup of the file just so you have the original version as well.

    You will now need to open the file in any text editor and replace the current code in there with the one from link provided in my previous comment.
    Since you are using subfolder installation this is the .htaccess code you should use:

    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]

    Save the changes and upload the file to it's original location overwriting the old one.

    Let us know if there are any improvements after that.

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi David,

    Since I can't access your files using support access could you provide us with FTP and cPanel login details so we can check your setup?
    Also, please revert the .htaccess file to it's previous rules so I can see what was in there before the change.

    You can send us your details using our contact form https://premium.wpmudev.org/contact/ and the template below:

    IMPORTANT: Make sure you select "I have a different question" for your topic so it doesn't go back to forums - this and the subject line ensure that it gets assigned to me.

    Subject: "Attn: Predrag Dubajic"
    - WordPress admin username
    - WordPress admin password
    - login url
    - FTP credentials (host/username/password)
    - cPanel credentials (host/username/password)
    - link back to this thread for reference
    - any other relevant urls

    Best regards,
    Predrag

  • Adam Czajczyk

    Hello David!

    I was able to access and check your site this time. I've found out that you're using "Login Redirect" and "Logout redirect" plugins on your setup and there were small mistakes in their configuration.

    Please login to your site as a super-admin and then go to "Network Admin" "Settings" -> "Network Settings" page and scroll down until "Login Redirect" section. You'll notice that for both Login and Logout redirect I've added "http://" part to existing URL. This solved the redirect issue.

    Just for further reference: that's not related to WordPress or any of these plugins. All URL that do not start with protocol part ("http://" indicates HTTP protocol, the same way as "ftp://" stands for FTP) are appended to any existing URL that's currently visible in your browser's bar.

    That said, please clear your browser's cache and then try to login and logout again and I think you'll be able to confirm that's working fine now. Let me know please!

    Best regards,
    Adam

  • David

    Hello Adam,

    Thank you so much for this great advise.

    This recommendation, is actually working perfectly now in my SUPER ADMIN PANEL.

    My concern also in regards with this situation is also same with my members in my multisites?

    Since i am using multisites.

    I mean in my super admin panel this login redirect page and logout redirect page is working properly now.

    My question is how about to my member's login redirect and logout redirect?

    Coz i have observed, i open one of my members account inside user admin, then i login, it redirects me to the default login redirect in my super admin panel.

    And i tried also to logout my member's admin, and it redirects also in the default page on my super admin panel.

    Example. blog.prosper8dotcom.com/geneveve (member's account)
    upon login to her account, it redirects me to this page: http://www.blog.prosper8dotcom.com (this is the site page of super admin panel)

    Then i logout my member's account of... blog.prosper8dotcom.com/geneveve (member's account)

    then it redirects me same in ... http://www.blog.prosper8dotcom.com (this is the site page of super admin panel)

    http://www.blog.prosper8dotcom.com (this is the site page of super admin panel)

    My question is how can my member do the same that when they login they will redirect automatically to their own site of ... blog.prosper8dotcom.com/geneveve (member's account)

    and vice versa after they logout they will redirect to their own page of... blog.prosper8dotcom.com/geneveve (member's account) ???

    Hope you can help me to resolve this issue as well.

    Thank you so much for your continuous support and understanding.

    David

  • Adam Czajczyk

    Hello David!

    I'm glad I could help :slight_smile:

    The redirect is the same for your main site and all sub-sites because the Login Redirect plugin is network enabled. You may want to network-disable it and then activate it "blog by blog" (on "per site" basis).

    If this plugin is network-enabled, setting from your "Network Admin Dashboard" are applied to entire network. When you enable it "blog by blog", each sub-site admin will be able to set his/her own redirect URL on sub-site "Dashboard -> Settings -> General" page.

    I hope that helps!
    Best regards,
    Adam

  • David

    Hello Adam,

    Thank you for responding.

    I want to clarify regarding "disable the plugin", what do you really by this?

    Actually i can't see literally this "disable the plugin", what plugin will i disable, and also what

    plugin will i enable in my member's area?

    If you could share me a screenshot much helping for me to identify very clearly??

    Thank you so much for your great support and assistance.

    David

  • Adam Czajczyk

    Hello David!

    Thanks for granting access again, I just wanted to make sure that I'm not missing anything :slight_smile:

    The steps would be as follows:

    1. Login to your site as super-admin
    2. Go to "Network Admin"
    3. Open "Installed plugins" page
    4. Scroll down until "Login Redirect"
    5. Click on "Network Deactivate"

    At this point "Login Redirect" plugin is inactive but available.

    6. In your "Network Admin" go to "Sites -> All sites" page
    7. Click on "Dashboard" link under the first Site on the list

    You'll be taken to the dashboard of that selected site.

    8. Now open "Plugins" page
    9. Scroll down until "Login Redirect" plugin
    8. Click on "Activate" link
    9. Open "Settings -> General" page
    8. Scroll down until "Login Redirect" filed
    9. Add redirect URL for this particular blog you're on (remember to include http:// prefix!)
    10. Save settings
    11. Go back to your "Network Admin"

    To setup "Login Redirect" for all blogs, repeat steps 6 - 11 for each blog.

    I hope that helps!

    Best regards,
    Adam

  • David

    Hello Adam,

    Thank you for your great assistance.

    Honestly, i am having some confusion in regards with the following:

    "6. In your "Network Admin" go to "Sites -> All sites" page
    7. Click on "Dashboard" link under the first Site on the list

    You'll be taken to the dashboard of that selected site."

    I may request if possible to have a quick video guide also so that i can see clearly where will i goes specifically?

    Hope you could provide me a quick video from start to finish, even without voice can help, as long as i can see clearly those points of the mouse.

    Thank you so much for your patience and understanding.

    David

  • Adam Czajczyk

    Hello David!

    I hope you're well today!

    I visited your site again and I can see that steps 1 - 5 are already completed so let's skip this as there's no need to do this again. I've attached a short move for you here:

    http://screencast.com/t/s5X4gqVwE

    This was taken on your site in order to avoid confusion as my dashboard looks significantly different. I think then you'll feel familiar with what you'll see :slight_smile:

    Here's what you'll want to do:

    1. Watch the video and repeat what you see there exactly
    2. Then do not exit your site or do anything else but (see screenshots "David-1.png" and "David-2.png", in this order!):

    - click on "Settings" menu on the left
    - click on "General" sub-menu under "Settings" menu on the left
    - scroll down until the "Login redirect" text field
    - put an URL (entire URL, including http://) of a site you wish users to be redirected to after login
    - scroll down and click "Save"

    From now on, you will want to repeat above steps with a single variation only. As you can see on the video, at one moment I'm hovering my mouse pointer over "Dashboard" link that's directly below the first blog on the list. When repeating the steps above do not click on "Dashboard" link of the first blog but instead click on the "Dashboard" link of the second blog on the list. Next time, use "Dashboard" link for the third blog on the list and so on.

    I hope this clarifies things a bit :slight_smile:

    Best regards,
    Adam