Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Sign Out Redirect

2456712

Comments

  • I think we misunderstood you intentions and thought that url was the root of the forum but it is the root of your site. Meaning it is an external url.

    You might be able to create a route in the dashboard but you are also limited in that it needs to be an internal url to change the route of logout.

    the htaccess rule would look something like this example for wordpress, Not sure how to write it for vanilla...

    RewriteRule ^logout/(.*) /wp-login.php?action=logout&_wpnonce=$1 [QSA,L]

  • edited April 2014

    here is a link with more info on how logout forms work with regards to htaccess

    http://httpd.apache.org/docs/current/mod/mod_auth_form.html

    AuthFormLogoutLocation Directive
    
    Description:    The URL to redirect to after a user has logged out
    Syntax: AuthFormLogoutLocation uri
    Default:    none
    Context:    directory
    Status: Base
    Module: mod_auth_form
    Compatibility:  Available in Apache HTTP Server 2.3.0 and later. The use of the expression parser hass been added in 2.4.4.
    The AuthFormLogoutLocation directive specifies the URL of a page on the server to redirect to should the user attempt to log out. The value is parsed using the ap_expr parser before being sent to the client.
    
    When a URI is accessed that is served by the handler form-logout-handler, the page specified by this directive will be shown to the end user. For example:
    
    Example
    
    <Location /logout>
        SetHandler form-logout-handler
        AuthFormLogoutLocation http://example.com/loggedout.html
        Session on
        #...
    </Location>
    An attempt to access the URI /logout/ will result in the user being logged out, and the page /loggedout.html will be displayed. Make sure that the page loggedout.html is not password protected, otherwise the page will not be displayed.
    

    http://webmaster.iu.edu/tools-and-guides/maintenance/redirect-htaccess.phtml

  • OK, I understand what needs to be done. But it is beyond my understanding as to how. I tried it and made a mess of everything. Maybe one of my programmer friends can look at it. Thank you for your help. At least I know what the problem is.

  • Yea don't change stuff until you understand what it does. Always make a copy of what you are editing in case it hits the fan then you simply replace that file with the good one.

  • Maybe I can get at it another way. How can I add menu items to the top main menu on the forum home page?

  • Use the plugin add menu item http://vanillaforums.org/addon/addmenuitem-plugin

    That would be easier to give them a link to get at the main site.

  • Yep. That worked and will be helpful for adding other menu items. Thank you. Now if I can just figure out why my locale changes are not working, everything will be hunky dory.

  • Remember to delete the .ini files in the cache of the forum when you make changes .

    The local should work right away. You add the language to the locales folder then you enable it from the dashboard. You can also enable it from the config.php

    en-Ca is for Canadian english, but to me it means California english ;)

    $Configuration[Garden][Local]='en-CA';

  • Yep, did all that (I I though CA was California as well). Here's the link to my post in the Locales problem: http://vanillaforums.org/discussion/26578/locale-text-changes-not-working?new=1

  • Got the Locale problem solved as well. See above link.

  • edited April 2014

    @rmeilech‌

    Ok I figured out how to get the redirect to work for you. Applying Occam's Razor principle I thought , it can't be that hard there is something easier....even.

    The problem was using relative urls in that line in the config. I tested this theory on my forum and it worked. I simply used this format for the url configuration:

    $Configuration['Garden']['Authenticator']['SignOutUrl'] = 'http://www.yoursite.com/forum/entry/signout/{Session_TransientKey}?Target=http://www.yoursite.com/';

    You need to use the full url of your forum in order for this to work. Using the relative url entry/signin is what makes it not work because it assumes it is relative to the forum root.

    This should work to pretty much redirect anywhere after logout....just replace the urls with yours....

  • Hmm. I just tried that and it did not work for me. Here's what I put in my conf/config.php : $Configuration['Garden']['Authenticator']['SignOutUrl'] = 'http://www.torahrx.com/forums/entry/signout/{Session_TransientKey}?Target=http://www.torahrx.com/';

    Am I missing something?

  • It should work for you. I tested this several times and it does work. I even have the categories as my home page too. So that is not the problem....

    If you can look in the status address bar at the bottom of the browser window when you hover the link to sign out what does the link look like ?
    Is it like what you put in or is something added?

    Please post the contents of you htaccess file located in the root of the forum.

  • No, the hover link is different. It shows www.torahrx.com/forums/entry/signout?TransientKey=xxxxxx.

    Here's the .htaccess:

    Original

    If you modify this file then change the above line to: # Modified


    RewriteEngine On
    # Certain hosts may require the following line.
    # If vanilla is in a subfolder then you need to specify it after the /.
    # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
    # RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]

  • Something is off. I just lost the changes I made in the Locale files. That was working and now it has reverted.

  • edited April 2014

    Ok please try this and let me know if that fixed the problem.

      # Modified
        # If you modify this file then change the above line to: # Modified
        <IfModule mod_rewrite.c>
           RewriteEngine On
           # Certain hosts may require the following line.
           # If vanilla is in a subfolder then you need to specify it after the /. 
           # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
           RewriteBase /forums
           RewriteCond %{REQUEST_FILENAME} !-d
           RewriteCond %{REQUEST_FILENAME} !-f
           RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
        </IfModule>
    
  • OK, figured that latter problem out. When you clear the cache, you have to reenable the Locale. Still not getting the correct code in the hover nor going to the external logout.

  • No change.

  • Will it help if you create a Member account and see for yourself what the hover looks like?

Sign In or Register to comment.