Redirect to subscription page if no permission.

  • Currently, if a user doesn't have permission to view a module (forum, gallery etc) they click the menu link and see a blank page.


    How could I redirect these users straight to a subscriptions page, thus encouraging them to subscribe to view the content?


    Or alternatively, redirect to another page explaining that they need a subscription.


    Thank you :)

  • Edit the permissionDenied Template and add the following code at the top and modify the placeholder:

    Smarty
    1. {capture assign='headContent'}
    2. <meta http-equiv="refresh" content="3;URL={ENTER_THE_FULL_URL_HERE}">
    3. {/capture}

    This will redirect them with a small delay.


    Alternatively, you can go ahead and change the wcf.page.error.permissionDenied language variable and add your very own content to it (e.g. a link and an explaination).

    return null;


    Browser: Firefox Nightly (64bit)

    Betriebssystem: Windows 10

  • Thank you. I'm going to test this.


    The thing that concerns me with this is non-members getting stuck in a redirection loop as they won't have access to the subscription page either.

  • The thing that concerns me with this is non-members getting stuck in a redirection loop as they won't have access to the subscription page either.

    Yeah, you could wrap {if $__wcf->user->userID}...{/if} around the meta line, so then it won't affect guests.

    return null;


    Browser: Firefox Nightly (64bit)

    Betriebssystem: Windows 10