Two domains on same webspace

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
User avatar
WiZARD
Moderator
Moderator
Posts: 1256
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: Two domains on same webspace

Post by WiZARD » Fri Aug 29, 2003 4:19 am

In Apache server use VirtualHost directive

User avatar
tryton
New php-forum User
New php-forum User
Posts: 49
Joined: Wed Jul 09, 2003 8:25 am
Location: Joze
Contact:

Post by tryton » Fri Aug 29, 2003 6:43 am

There should be documentation for this with your web hosting company. Do a search for using .htaccess on google. Here are the instructions from my web hosting company for using htaccess.

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Post by Redcircle » Fri Aug 29, 2003 10:11 am

OR

you can slap this at the top of your index.php file

Code: Select all

switch($_SERVER['HTTP_HOST'])
{
   case 'www.a.com':
     header('Location: http://www.a.com/A/');
     break;
   case 'www.b.com':
     header('Location: http://www.b.com/B/');
     break;
}


sigix
php-forum Active User
php-forum Active User
Posts: 364
Joined: Mon Jul 14, 2003 9:39 pm
Location: /Earth/Xion

Post by sigix » Fri Aug 29, 2003 11:29 am

your server admin (hosting comp) can do that to redirect that request to right page of domain

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

admin access

Post by ruturajv » Fri Aug 29, 2003 9:04 pm

you really need access to the admin level for using apache directives, else check for your web hoster

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 8 guests