Skip to main content

Redirect Domain/Site to Alternate Domain when Suspending

Comments

9 comments

  • SD14

    1. Unsuspend account
    2. Change Password
    3. Setup the redirect

    0
  • jethrodesign

    OK, thanks for replies. So based on this, setting up the redirect prior to the account being suspended will NOT function properly (which is what I'm seeing). I thought I had read in a couple places that as long as the redirect was setup before the account was suspended, it might continue to work.

    - Would there be a way to edit this 'account_suspensions.conf' file to have the redirect point where we are desiring instead of to the default suspended account page? Or would that affect ANY/ALL suspended accounts?

     

     

    0
  • cPRex Jurassic Moderator

    No, you can't edit the account_suspensions.conf file manually - it even tells you not to do that inside the file.

    Here's what that file looks like when an account gets suspended:

    RewriteEngine On

    <Directory "/home/cptest1">
        AllowOverride none
        RedirectMatch ^/(?!cgi-sys/suspendedpage.cgi).* /cgi-sys/suspendedpage.cgi
    </Directory>

    Your best option would be the WHM >> Web Template Editor to customize the suspendedpage.cgi that gets used when an account is suspended, although that will apply to all domains.

    0
  • jethrodesign

    Hi, thanks for the response. 

    A couple of our suspended accounts are still active sties hosted elsewhere, so we wouldn't want a global redirect that would send ALL suspended account traffic to a single redirect or URL (in case any DNS is still hosted or being hit on our server). 

    - So is our ONLY option to unsuspend an account so the redirect would be picked up and work?

    - Any other creative solutions for this?

    These organizations are part of a larger parent organization, so even when they close it would still be much more appropriate for traffic to hit the parent organization instead of a pretty bleak looking 'Account Suspended' page.

    Even if the general suspended redirect would send to an account's root page where a local .htaccess file could set the individual redirect for the site (if necessary) would be beneficial.

    Thanks again for any insight here!

    0
  • quietFinn

    if you suspend the account it means that the account till exists, so why don't you instead just empty the account, and set only .htaccess to do the redirect?

     

    0
  • jethrodesign

    if you suspend the account it means that the account till exists, so why don't you instead just empty the account, and set only .htaccess to do the redirect?

    So not suspend the account at all? Suppose we 'could' do that, but do like the management in WHM of having these accounts be suspended along with the other aspects that brings, and like the fact that the accounts 'could' be restored if for some crazy reason that ever was needed.

     

    0
  • jethrodesign

    In the end, we ended up just modifying the default cPanel 'Suspended Account' page with a brief message and a meta redirect to the parent organization site. This works for a couple of the sites that have been suspended, and a couple other that are still active were not hitting the Suspended Account page anyway. So this works OK for now, but if any alternate sites need to be suspended in the future that don't make sense with this redirect we'll have to redo it.

    Wish a simple redirect would have been simpler, but understand suspended users may abuse this unless it could be restricted by WHM admins... 

    0
  • cPRex Jurassic Moderator

    You are always welcome to submit a feature request at features.cpanel.net if you'd like to see us improve or change that behavior - I handle that area as well and I'll make sure it gets reviewed.

    0

Please sign in to leave a comment.