Reply to Re: domain name pointing to a page

Your name:

Reply:


Posted by Jerry Stuckle on 05/25/05 03:43

Bob Bedford wrote:
>
> "Steve" <googlespam@nastysoft.com> a écrit dans le message de news:
> 1116943063.700592.237350@o13g2000cwo.googlegroups.com...
>
>>
>> It sounds to me like you imagine that a request can be plucked out of
>> the ether before it reaches a host and redirected to somewhere of your
>> choosing. Your clients must first buy the domain "clientsite.com" and
>> then set up the redirect as suggested using any of the usual methods,
>> including the specific one provided by Alvaro.
>>
>> When someone types the URL "http://www.clientsite.com" into their
>> browser address bar, the browser contacts their ISP and asks for the IP
>> address of the host "www.clientsite.com". The ISP knows the IP address
>> because the domain name has been bought and registered and so exists in
>> the Domain Naming System. Back comes the reply 216.37.46.27 and the
>> browser then sends a request to that host. The host receives the
>> request and sends back the response. If the response is a redirect
>> you'll get the effect you want.
>>
>> I assume you specified "client=455" because that is meaningful to the
>> script executing at www.mysite.com. You therefore know that the request
>> came originally from www.clientsite.com because you will set things up
>> so www.clientsite.com is the only host that redirects to
>> www.mysite.com?client=455. Some other client www.randomsite.com will
>> forward to (for instance) www.mysite.com?client=123
>>
> Sounds like I didn't expain well the whole thing:
>
> www.mysite.com and www.clientsite.com both point to my website
> (www.mysite.com)
> Now, when any person type one or the other URL, then the result is my
> website.
> What I want to achieve, is that when he types www.clientsite.com, then I
> redirect to the client=455.
>
> So in my index.php, I'd like to know wich URL was typed (mysite.com or
> clientsite.com) and redirect if the URL is clientsite.com.
> Sounds simple, and many website do it. I'd like to know how.
>
> Bob
>

Bob,

You can't do it that way. You need to set it up in the server.

The reason is this: When they type in http://www.clientsite.com, the DNS
may direct it to your web server. However, your server will look at the
incoming request, and see it isn't for www.yoursite.com - and since it
doesn't know about www.clientsite.com, it rejects the request.

For Apache, look up the Virtual Host command. If you're using IIS,
there is a similar way to do this - I just haven't looked into it to
find out how.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация