ispCP - Board - Support
Domain Disabled message howto? - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: General discussion (/forum-11.html)
+--- Thread: Domain Disabled message howto? (/thread-5273.html)



Domain Disabled message howto? - xokaido - 12-29-2008 02:59 AM

Hello all...
I have a question:
I want to be able to show error message indicating
that domain (the client is on) is disabled...
I have seen some ISPCP Omega customers did this and want to
do it but don't know how...
is it possible to show my Error file when domain is disabled?...
Thank you in advance... :-)


RE: Domain Disabled message howto? - xokaido - 12-31-2008 11:54 AM

Here I wrote little bash script for that purpose... can share if anyone needs:
Quote:#!/bin/bash

DOM_DIR=/var/www/virtual # directory where all domains go
DOMAINS="`ls $DOM_DIR`" # domains we have
MOVED="`ls $DOM_DIR/suspend | grep -v 'htdocs'`" # directory where we would link for message
# this dir also should contain 'htdocs' subdir
for dom in $DOMAINS
do
if [ ${dom##*.} == "disabled" ] # if we have disabled domain...
then
DEST_DIR=${DOM_DIR}/${dom%.*} # destination dir = removed .disabled
[ ! -e ${DEST_DIR} ] && ln -s suspend ${DEST_DIR}
fi
done

###################################################################

for mov in $MOVED
# if dommain has been enabled
do
DOMAIN=${mov%.*} # remove .dsiabled string from it
[ -e ${DOM_DIR}/${DOMAIN} ] && unlink ${DOM_DIR}/${DOMAIN} # unlink domain if exists
mv ${DOM_DIR}/suspend/${mov} ${DOM_DIR}/${DOMAIN} # move folder *.disabled to its original position
done

change script to meet your needs, save it, name it whatever you like and after
place it in your cronjob (crontab -e then type five asterisks followed by the path of this script)
Here is the good link for crontab howto:
http://blog.fekw.de/2008/04/05/cronjob-crontab-howto/
Happy new year all... Big Grin


RE: Domain Disabled message howto? - Blondak - 09-04-2009 09:29 PM

Hi,
I'm writing patch that allows set redirect page, but I am not sure where setup target URL, somewhere in reseller properties? Or hidden (for customers) part of Hosting plan , which is transferred to domain properties (editable per user)?

What do you think?

EDIT:
OK, i have complete this patch Ticket 266. Reseller can set (under "Edit Domain") "Redirect disabled domain" and enter URL to which is disabled domain redirected.
Patch is made against current trunk.


RE: Domain Disabled message howto? - lambwell - 01-11-2010 04:22 PM

Hi,
It means you cannot link directly to files on their server.
for instance they might have an image on a page and you want it to appear on your page so you use the full url in your image tag to link to the file. some servers don't allow this.
download the file to your hard drive then upload it to your own homepage directory
or upload it below and get the html source code on the next page to paste on your page