--- Gordon Stewart <[EMAIL PROTECTED]> wrote: > Im not sure if PHP can help here - > > But Im helping a friend with his websites... > > on the host im familiar with, if I have multiple domains, on an > account - I can re-direct the requests to different folders - So I can > have different web-pages shown for each domain. > > I use htaccess for this. > > PROBLEM:- > > with my friends host - he has 3 websites, but when I type :- > > http://www.domain1.com/ > http://www.domain2.com/ > > or > > http://www.domain3.com/ > > the URl automatically re-directs to http://www.domain1.com/, & shows > the main web-page. > > the web host has NO htacess (Ive emailed them).. > > I was wondering if anyone has used PHp to overcome this problem ? > > A) the URL does NOT change (Ie remain as http://www.domain2.com/ ) and > > B) - display a file from a specified directory. > > > -- > G
It depends on where the redirect occurs. I would start by making a simple script as the default page to display the requested domain name: print $_SERVER['SERVER_NAME']; This should show the server's domain name based on the HTTP request from the browser. Then you can use a switch statement on the value and perform a redirect of some kind to show the desired content. James _____ James D. Keeline http://www.Keeline.com http://www.Keeline.com/articles http://Stratemeyer.org http://www.Keeline.com/TSCollection http://www.ITeachPHP.com -- Free Computer Classes: Linux, PHP, etc. Spring Semester January-June 2006. Two new class topics. Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
