Add to Favourites Add to Favourites    Print this Article Print this Article

Creating a custom index.html for new subdomains

Since there is no template for the subdomain index.html (will likely change), you can still create your own index.html files for them, but you have to use the subdomain_create_post.sh file.

Create:

/usr/local/directadmin/scripts/custom/subdomain_create_post.sh

In it, put something like:

#!/bin/sh
INDEX=/home/$username/domains/$domain/public_html/$subdomain/index.html
rm -f $INDEX
cp /your/custom/index.html $INDEX
chown $username:$username $INDEX
exit 0;



Then chmod the subdomain_create_post.sh to 755.
Obviosly, change /your/custom/index.html to whatever you'd like.

Was this answer helpful?

Also Read