TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   several domains in one server (http://www.talkphp.com/absolute-beginners/1286-several-domains-one-server.html)

Fba24 10-10-2007 01:00 PM

several domains in one server
 
Hi how are you guys

I'm asking about how to make a domain to be redirected to a folder

for example:-

I want the domain www.aramco-itc.com to redirect to the folder "/aramco-itc"

and www.fba24.com to the folder "/fba24"

that's to make several websites on one server

Thanks

Wildhoney 10-10-2007 01:08 PM

Perfect thanks. It's my Birthday :) ! To redirect like you're asking, the easiest way is possibly PHP's way. Although you could do down the .HTACCESS route if you were that way inclined.

PHP Code:

header('location: http://www.myDomain.com/' $_SERVER['HTTP_HOST'] . '/');
exit; 

Note: We issue exit so that browsers that choose not to redirect there (Very few - really only when browsing with a terminal application such as Telnet that's not really a browser) would still exit at that point. See this article for further information.

Fba24 10-10-2007 01:17 PM

Thanks man, but I was asking to attached more than one domain to my server and make folder for each one

I'll be thankful if you can help me and HAPPY BIRTHDAY :)

Salathe 10-10-2007 02:30 PM

Are you using any pieces of software to manage your websites (Eg, Cpanel, DirectAdmin). If so, they'll do it automatically for you. If not, we need to know which server setup you're using (Apache, IIS, Lighttpd, etc).


All times are GMT. The time now is 04:41 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0