multiple domains and url masking

Question:

I own two other domains that are registered with a different hosting company. I want to transfer the domains here and point them to a subdirectory.

I also want domain masking so when my users type www.second_domain.com into the browser they see www.second_domain.com when the page loads, not www.my_primary_domain.com/second_domain

Is this possible and how much will it cost?

Thanks!

Answer:

Hi,

There is no extra cost (as long as these are not high traffic sites – if they are, you’ll need to make a seperate account for them).

Just go to the domain section of the control panel and follow the extra domains list.

You can add the extra domains there and point them to the directory of your choice.

They will resolve totally independent of your primary domain.

Let us know if you need more help!

session.auto_start

Question:

I am trying to use sessions in a php script. But, after reading some documentation I realized that the following line needs to be added to the php.ini file

session.auto_start = 1

Could you please add this line for the php.ini file for my account?

Answer:

You can add any php.ini command to your account by creating a .htaccess file.

I created a .htaccess file in your www dir with the command

php_value session.auto_start 1

in it. This should do what you want.

php cgi and $_SERVER[‘php_auth_user’] problems

Question:

I upgraded my version of PHP from 4.4.0 mod_php (scripts run as nobody) to 4.4.0 (run as my username), per the PHP version configuration panel. Now I am getting some authentication problems:

Since the upgrade I am finding that $_SERVER[‘PHP_AUTH_USER’] is now null, whereas before it was populated.

Answer :

Hi,

Try and use :

$_SERVER[‘REMOTE_USER’]

That should work. The cgi versions of php don’t have access to the HTTP vars. Check :

http://us2.php.net/features.http-auth

for more on this.

Will my secure certificate work on my wildcard domains?

Question:

I have multiple subdomains that I use on my site (sub1.my-domain.com, sub2.my-domain.com, sub3.my-domain.com, etc.). If I buy an SSL certificate will it work for all my subdomains?

Answer:

A regular certificate work for all domains, however it will give a warning on anything other than the domain it is issued to. The site will still be encrypted but the user’s web browser will get a warning about the name mismatch.

You can buy wildcard certs but they are pretty expensive.

If you just want encryption, a regular single-domain cert will work fine for all your subdomains. But if you need it to look correct on all domains (ie. no site-name mismatch warning from the browser) you’ll need either a wildcard cert or multiple single domain certs.

Forcing all requests from one domain name to go to another (and update address bar)

This is a mod_rewrite recipe that will force all requests for your hosting account to be
redirected to a particular domain.

Here’s an example:

You have

my-domain.com,
my-domain.net,
my-domain.org

on your account. You would like requests for any of the domain names to go to:

my-domain.com

and to update the address bar in the browser to reflect this.

Here’s how to do it :

Create a .htaccess file in your top web directory (the directory www for most users)

put the following lines in it:


RewriteEngine On

# this will force all domain requests to go to my-domain.com
RewriteCond %{HTTP_HOST} !^www.my-domain.com
rewriterule (.*) http://www.my-domain.com/$1 [R=permanent,L]

How Do I determine the full path to a directory?

Question:

I have a script that is asking for the full path to a file. How do I determine this?

Answer:

Hi,

The full path would be:

/home/your_username/

plus the rest of the path in your ftp.

For example if it was in your

data

dir it would be :

/home/your_username/data/

if it was in :

some_dir1/sub_dir2/data

it would be :

/home/your_username/some_dir1/sub_dir2/data

Be sure to replace :

your_username

with your actual username

Also, keep in mind that all server paths are case-sensitive. Use all lowercase unless one of your directories has capital letters in it.

I can’t create new databases

Question:

I can’t seem to create a new database.

I tried both from the mysql command line and from phpMyAdmin – it won’t work!

Answer:

All new databases must be created from the control panel.

Due to security issues, your database user cannot create new databases. However if you log in to the control panel and go to the database section you can create new databases there.

Why do I get blank form submissions?

Question:

Starting last week we have been receiving e-mails (maybe 5-10 a day) that the subject is “Form Submission”. However the email is blank. There is no From or other information in the email.

Where are these e-mails coming from? Are these generated from our website or somewhere else? Any guidance you can provide would be helpful.

Answer:

Hi,

I checked your site and it looks like you are using the popular formmail.pl script.

Usually these type of emails are generated by badly wrote web-robots (search engine indexers, etc.) that are indexing your site and submitting the blank forms.

Another likely possiblilty is that they are spam-bot attempts to use your form to send out spam. I checked out your script and it is the latest version so you should be safe. Older versions of formmail.pl had a bug that allowed spam sending so there are all kinds of spam-bots out searching for exploitable formmail.pl scripts to exploit.

Again if you are using version 1.92 or above you should be safe. If you are using anything older, you need to upgrade ASAP!