Replicating Sites on Apache
Replicating Sites on Apache
am 04.04.2008 18:12:04 von KDawg44
Hi,
I am thinking this is an Apache question and not a coding question,
but if I am wrong I apologize for posting here.
I am developing a site for my company. The site will have be the same
except for a few placeholders that will dynamically change. I'd like
this to be one set of pages for the site but they need to be
replicated for people.
Basically, the each person will have their own site like:
www.domain.com/personA
www.domain.com/personB
www.domain.com/personC
etc.
However, the site will be the same set of pages except for I need to
pass in an ID for each person. So I need to map personA = 123, person
B =321, etc.
Then the dynamic part of the page will display content depending on
the ID number passed in.
How would I go about doing that? We will be hosting this site at a
hosting location, probably GoDaddy.
Thank you very much for all your help and please let me know if I left
any relevant information out.
Kevin
Re: Replicating Sites on Apache
am 06.04.2008 15:51:36 von MC
"KDawg44" wrote in message
news:1469d0b8-ea77-4960-adf9-94c59ab191f9@l42g2000hsc.google groups.com...
> Hi,
>
> I am thinking this is an Apache question and not a coding question,
> but if I am wrong I apologize for posting here.
>
> I am developing a site for my company. The site will have be the same
> except for a few placeholders that will dynamically change. I'd like
> this to be one set of pages for the site but they need to be
> replicated for people.
>
> Basically, the each person will have their own site like:
>
> www.domain.com/personA
> www.domain.com/personB
> www.domain.com/personC
>
> etc.
>
> However, the site will be the same set of pages except for I need to
> pass in an ID for each person. So I need to map personA = 123, person
> B =321, etc.
>
> Then the dynamic part of the page will display content depending on
> the ID number passed in.
>
> How would I go about doing that? We will be hosting this site at a
> hosting location, probably GoDaddy.
>
> Thank you very much for all your help and please let me know if I left
> any relevant information out.
>
> Kevin
You will need to 'id' the person using a login or cookie, then use PHP, JSP,
ASP, CF, etc to retrieve user preference data and display in the page.
Mica
Re: Replicating Sites on Apache
am 07.04.2008 15:01:00 von Holleran.Kevin
On Apr 6, 9:51 am, "MC" wrote:
> "KDawg44" wrote in message
>
> news:1469d0b8-ea77-4960-adf9-94c59ab191f9@l42g2000hsc.google groups.com...
>
>
>
> > Hi,
>
> > I am thinking this is an Apache question and not a coding question,
> > but if I am wrong I apologize for posting here.
>
> > I am developing a site for my company. The site will have be the same
> > except for a few placeholders that will dynamically change. I'd like
> > this to be one set of pages for the site but they need to be
> > replicated for people.
>
> > Basically, the each person will have their own site like:
>
> >www.domain.com/personA
> >www.domain.com/personB
> >www.domain.com/personC
>
> > etc.
>
> > However, the site will be the same set of pages except for I need to
> > pass in an ID for each person. So I need to map personA = 123, person
> > B =321, etc.
>
> > Then the dynamic part of the page will display content depending on
> > the ID number passed in.
>
> > How would I go about doing that? We will be hosting this site at a
> > hosting location, probably GoDaddy.
>
> > Thank you very much for all your help and please let me know if I left
> > any relevant information out.
>
> > Kevin
>
> You will need to 'id' the person using a login or cookie, then use PHP, JSP,
> ASP, CF, etc to retrieve user preference data and display in the page.
>
> Mica
I understand the scripting side. A login is not possible. This is a
replicated site for our customers who in turn, sell our products.
What I need to do is have the appearance of them having their own
site:
www.mydomain.com/steveyzerman
www.mydomain.com/vladimirkonstantinov
www.mydomain.com/lordstanley
but in reality all of these point to one set of pages, say index.php.
Then, the index.php knows that if the domain requested was
steveyzerman, that this person's unique id number is 1234 and when
they go to shop, this id will be passed in so the customer gets credit
for the sale.
The coding I can do, but I was wondering how I make all of those URLs
point to the same set of pages. I would greatly prefer not to do a
redirect as I want the address bar to say www.mydomain.com/steveyzerman
if that's whose page it is.
Thanks for any help.
Kevin
Re: Replicating Sites on Apache
am 07.04.2008 15:57:11 von MC
"K.J. 44" wrote in message
news:cff556fe-43ef-4402-9709-54be015e8c46@m73g2000hsh.google groups.com...
> On Apr 6, 9:51 am, "MC" wrote:
>> "KDawg44" wrote in message
>>
>> news:1469d0b8-ea77-4960-adf9-94c59ab191f9@l42g2000hsc.google groups.com...
>>
>>
>>
>> > Hi,
>>
>> > I am thinking this is an Apache question and not a coding question,
>> > but if I am wrong I apologize for posting here.
>>
>> > I am developing a site for my company. The site will have be the same
>> > except for a few placeholders that will dynamically change. I'd like
>> > this to be one set of pages for the site but they need to be
>> > replicated for people.
>>
>> > Basically, the each person will have their own site like:
>>
>> >www.domain.com/personA
>> >www.domain.com/personB
>> >www.domain.com/personC
>>
>> > etc.
>>
>> > However, the site will be the same set of pages except for I need to
>> > pass in an ID for each person. So I need to map personA = 123, person
>> > B =321, etc.
>>
>> > Then the dynamic part of the page will display content depending on
>> > the ID number passed in.
>>
>> > How would I go about doing that? We will be hosting this site at a
>> > hosting location, probably GoDaddy.
>>
>> > Thank you very much for all your help and please let me know if I left
>> > any relevant information out.
>>
>> > Kevin
>>
>> You will need to 'id' the person using a login or cookie, then use PHP,
>> JSP,
>> ASP, CF, etc to retrieve user preference data and display in the page.
>>
>> Mica
>
> I understand the scripting side. A login is not possible. This is a
> replicated site for our customers who in turn, sell our products.
> What I need to do is have the appearance of them having their own
> site:
>
> www.mydomain.com/steveyzerman
> www.mydomain.com/vladimirkonstantinov
> www.mydomain.com/lordstanley
>
> but in reality all of these point to one set of pages, say index.php.
>
> Then, the index.php knows that if the domain requested was
> steveyzerman, that this person's unique id number is 1234 and when
> they go to shop, this id will be passed in so the customer gets credit
> for the sale.
>
> The coding I can do, but I was wondering how I make all of those URLs
> point to the same set of pages. I would greatly prefer not to do a
> redirect as I want the address bar to say www.mydomain.com/steveyzerman
> if that's whose page it is.
>
> Thanks for any help.
>
> Kevin
Kevin,
Gotcha. There is probably something more elegant but, with Apache you can
take x.com/tom, x.com/harry and redirect them to a x.com/index.php?user=1
RewriteRule ^x.com\tom.html$ x.com/index.php?user=1 [L,R]
RewriteRule ^x.com\harry.html$ x.com/index.php?user=2 [L,R]
and then rewrite the url coming out to show tom, harry, etc. You will need
to get one of the experts here to help you there. The syntax is not my
forte.
Mica
Re: Replicating Sites on Apache
am 07.04.2008 16:10:48 von KDawg44
On Apr 7, 9:57 am, "MC" wrote:
> "K.J. 44" wrote in message
>
> news:cff556fe-43ef-4402-9709-54be015e8c46@m73g2000hsh.google groups.com...
>
>
>
> > On Apr 6, 9:51 am, "MC" wrote:
> >> "KDawg44" wrote in message
>
> >>news:1469d0b8-ea77-4960-adf9-94c59ab191f9@l42g2000hsc.goog legroups.com...
>
> >> > Hi,
>
> >> > I am thinking this is an Apache question and not a coding question,
> >> > but if I am wrong I apologize for posting here.
>
> >> > I am developing a site for my company. The site will have be the same
> >> > except for a few placeholders that will dynamically change. I'd like
> >> > this to be one set of pages for the site but they need to be
> >> > replicated for people.
>
> >> > Basically, the each person will have their own site like:
>
> >> >www.domain.com/personA
> >> >www.domain.com/personB
> >> >www.domain.com/personC
>
> >> > etc.
>
> >> > However, the site will be the same set of pages except for I need to
> >> > pass in an ID for each person. So I need to map personA = 123, person
> >> > B =321, etc.
>
> >> > Then the dynamic part of the page will display content depending on
> >> > the ID number passed in.
>
> >> > How would I go about doing that? We will be hosting this site at a
> >> > hosting location, probably GoDaddy.
>
> >> > Thank you very much for all your help and please let me know if I left
> >> > any relevant information out.
>
> >> > Kevin
>
> >> You will need to 'id' the person using a login or cookie, then use PHP,
> >> JSP,
> >> ASP, CF, etc to retrieve user preference data and display in the page.
>
> >> Mica
>
> > I understand the scripting side. A login is not possible. This is a
> > replicated site for our customers who in turn, sell our products.
> > What I need to do is have the appearance of them having their own
> > site:
>
> >www.mydomain.com/steveyzerman
> >www.mydomain.com/vladimirkonstantinov
> >www.mydomain.com/lordstanley
>
> > but in reality all of these point to one set of pages, say index.php.
>
> > Then, the index.php knows that if the domain requested was
> > steveyzerman, that this person's unique id number is 1234 and when
> > they go to shop, this id will be passed in so the customer gets credit
> > for the sale.
>
> > The coding I can do, but I was wondering how I make all of those URLs
> > point to the same set of pages. I would greatly prefer not to do a
> > redirect as I want the address bar to saywww.mydomain.com/steveyzerman
> > if that's whose page it is.
>
> > Thanks for any help.
>
> > Kevin
>
> Kevin,
>
> Gotcha. There is probably something more elegant but, with Apache you can
> take x.com/tom, x.com/harry and redirect them to a x.com/index.php?user=1
>
> RewriteRule ^x.com\tom.html$ x.com/index.php?user=1 [L,R]
> RewriteRule ^x.com\harry.html$ x.com/index.php?user=2 [L,R]
>
> and then rewrite the url coming out to show tom, harry, etc. You will need
> to get one of the experts here to help you there. The syntax is not my
> forte.
>
> Mica
That's perfect! Thanks. That gives me a starting point to do further
research.
Thanks for your help.