Redirecting to custom page if subscription doesn't exist

Discussion in 'Customization & add-ons' started by cullenpowell, Jul 20, 2009.

  1. cullenpowell

    cullenpowell New Member

    Joined:
    Jul 20, 2009
    Messages:
    1
    Does anyone know what would be the best way to redirect a member to a custom page if a specified subscription doesn't exist?

    I have three subscriptions, one is the core subscription which everyone receives. I have two other subscriptions and these two each have a separate protected folder.

    What I would like to do, is if the customer isn't subscribed to one of these subscriptions, instead of taking them to the login page with the message:

    "Access to this membership area is not allowed......"

    I would like to take them to a custom page so they can order these subscriptions.

    So basically I'm trying to find a way to define a custom URL for certain areas instead of taking the customer to an access denied page if they don't already have an active subscription to that area.
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    You should be able to do it by doing a check on the error code and then doing a redirect.
    something like this on error.inc.html
    {if $e eq "no-access"}
    redirect
    {/if}


    David

Share This Page