Two domains on same webspace

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

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

Fri Aug 29, 2003 4:19 am

In Apache server use VirtualHost directive
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

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

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.
JCCorner.com - Online marketplace including online mall, link trading post, web articles and community board.

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

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

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: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

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
  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests