singledomainhostingwindowsus

Single Domain Hosting Windows US

How do I set the default page?

When a hosting order is purchased, a default index.html page is uploaded to the hosting. You may rename or delete this default file after uploading your website content, so that your website resolves without any issues.

You may manually set the default page for your website by following these steps.

Linux Hosting

The default file can be specified using the .htaccess file.

Example:

If "Homepage.html" is the default page for your domain then you can add the below line to the .htaccess file.

DirectoryIndex Homepage.html

Windows Hosting

You can follow these steps to set the default page from your Plesk panel

  1. Login to the Plesk panel of the domain name for which you wish to set the default page.

  2. Click the Virtual Directories link.

  3. Under the Tools section, click the Directory Properties button.

  4. Under Documents, set the required default page by moving it to the top and click the OK button.

ASP Script to Test MSSQL Database Connectivity

Provided below is a simple ASP script to test MSSQL database connectivity.

Sample Script


Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "Provider=SQLOLEDB;Server=;Database=;UID=;PWD=;"
cn.CommandTimeout = 900
cn.Close
Response.write("Connected Successfully")
%>

Explanation about the variables used in the script:

  • Server: The MSSQL Server IP needs to be mentioned.

  • Database: Specify exact database name. For example, reseloaq_mssql.

  • UID: Mention the database user associated with the database.

  • PWD: Mention the password for the above database user.

PHP Script to Test MySQL Database Connectivity

Provided below is a simple PHP script to test MySQL database connectivity. The result of this script displays the names of the tables present within the specified database.

Sample Script



$connect=mysql_connect("dbserver","dbuser","dbpassword") or die("Unable to Connect");
mysql_select_db("dbname") or die("Could not open the db");
$showtablequery="SHOW TABLES FROM dbname";
$query_result=mysql_query($showtablequery);
while($showtablerow = mysql_fetch_array($query_result))
{
echo $showtablerow[0]." ";
}
?>

Explanation about the variables used in the script:

  • dbserver: Mention the value as localhost for Linux Hosting (cPanel). For Windows Hosting (Plesk), MySQL Server IP needs to be mentioned.

  • dbname: Specify complete database name including the prefix. For example, reseloaq_mysql.

  • dbuser: Mention the database user associated with the database.

  • dbpassword: Mention the password for the above database user.

Collaboration Data Objects (CDO)

Originally known as Active Messaging, the Collaboration Data Objects (CDO) library allows users to send mails through ASP Scripts.

Collaboration Data Objects (CDO) is Microsoft's technology for building messaging or collaboration applications or adding these capabilities to existing applications. Part of the Microsoft Exchange Server
product, CDO has evolved from what Microsoft formerly called Object Linking and Embedding Messaging and, more recently, Active Messaging.

You can use the sample script provided by and tweak it a bit to your requirements, to accept feedback from your website visitors and get
the results emailed to you.

You would need to change the Email Address in the field myMail.From to any Email Address on the domain name on which you are incorporating the script.

Example:

If your Domain Name is abc.com, then you would define the From Email Address as some-name@abc.com. This Email Address need not be existing on the Mail Server of abc.com, however, the
domain name in the myMail.From field has to be yours. You may use an Email Address such as Do_Not_reply@abc.com.

The Email Address in the myMail.To field needs to be changed to your Email Address, where you wish to receive Emails submitted through the form.

Sample Script



Note

The body of the mail should not have bare linefeeds (\n). If a bare linefeed is detected, the SMTP service of Microsoft IIS6 (the Web Server running on
's Windows servers) will stop delivering any mail and the mails will get struck in the SMTP queue. This is because Microsoft IIS6 strictly
follows Internet e-mail standards; and these standards forbid the presence of bare linefeed characters in e-mail messages.

Additional Information

Bare LineFeeds in SMTP

Example:

myMail.TextBody="Thank you for contacting us. We shall get back to you shortly.\n

Kind regards\n

abc.com"

In the above case, bare linefeeds (\n) are being used. Instead of \n, you need to use \r\n (carriage-return, line-feed). Hence, the correct usage would be:


myMail.TextBody="Thank you for contacting us. We shall get back to you shortly.\r\n

Kind regards\r\n

abc.com"