Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: URL to Dynamic pages


Message #1 by "Ralph Porter" <RalphPorter@1...> on Thu, 21 Dec 2000 09:00:00 -0000
Hi,



  I am writing a site that could be used potentially by several cients, I

want to be able to present the clients pages to the consumer each by a

different URL. However I don't want to have to create a new page for each

client as one dynamic database driven page can serve all. So my question

is both can you do this and how do you do this, for example:



I want the public to be able to specify both:



www.mysite.com/customer1

and

www.mysite.com/customer2



From both URLs I want to execute the same page but with different dynamic

content dependant upon the customer name. I hope that makes sense!



Thank you.



          Ralph.

 





---

MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.

---

You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #2 by Vince Kavanagh <vince@6...> on Thu, 21 Dec 2000 10:54:52 +0000
You could use,  Request.ServerVariables("http_referer") and then use a select case with a
Response.Redirect.



Dim From

From = Request.ServerVariables("http_referer")

  Select Case From

      Case http://www.mydomain.com/smith.html

        Response.Redirect "http://www.mydomain.com/template.html?customer=smith"

      Case http://www.mydomain.com/jones.html

       Response.Redirect "http://www.mydomain.com/template.html?customer=jones"

      Case Else

        Response.Redirect "http://www.mydomain.com/home.html"

End Select



You would probably want to trim the referring URL to just the relevant part.



Best Regards,



Vince.





Regards,



Vince.



Ralph Porter wrote:



> Hi,

>

>   I am writing a site that could be used potentially by several cients, I

> want to be able to present the clients pages to the consumer each by a

> different URL. However I don't want to have to create a new page for each

> client as one dynamic database driven page can serve all. So my question

> is both can you do this and how do you do this, for example:

>

> I want the public to be able to specify both:

>

> www.mysite.com/customer1

> and

> www.mysite.com/customer2

>

> >From both URLs I want to execute the same page but with different dynamic

> content dependant upon the customer name. I hope that makes sense!

>

> Thank you.

>

>           Ralph.

>



---

MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.

---

You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #3 by Peter Zahos <peter_zahos@s...> on Fri, 22 Dec 2000 08:49:53 +0800
Your good!



-----Original Message-----

From: Vince Kavanagh [mailto:vince@6...]

Sent: Thursday, 21 December 2000 6:55 PM

To: ASP Web HowTo

Subject: [asp_web_howto] Re: URL to Dynamic pages





You could use,  Request.ServerVariables("http_referer") and then use a

select case with a Response.Redirect.



Dim From

From = Request.ServerVariables("http_referer")

  Select Case From

      Case http://www.mydomain.com/smith.html

        Response.Redirect

"http://www.mydomain.com/template.html?customer=smith"

      Case http://www.mydomain.com/jones.html

       Response.Redirect

"http://www.mydomain.com/template.html?customer=jones"

      Case Else

        Response.Redirect "http://www.mydomain.com/home.html"

End Select



You would probably want to trim the referring URL to just the relevant part.



Best Regards,



Vince.





Regards,



Vince.



Ralph Porter wrote:



> Hi,

>

>   I am writing a site that could be used potentially by several cients, I

> want to be able to present the clients pages to the consumer each by a

> different URL. However I don't want to have to create a new page for each

> client as one dynamic database driven page can serve all. So my question

> is both can you do this and how do you do this, for example:

>

> I want the public to be able to specify both:

>

> www.mysite.com/customer1

> and

> www.mysite.com/customer2

>

> >From both URLs I want to execute the same page but with different dynamic

> content dependant upon the customer name. I hope that makes sense!

>

> Thank you.

>

>           Ralph.

>





---

MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.

---

You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #4 by "Oleg Perepelkin" <operep@m...> on Fri, 22 Dec 2000 16:41:27 +1000
Use

Server.Execute("yourasppage.asp?content=customer1") if it's IIS5

OR

use Server Side Include

in default.asp in that www.mysite.com/customer1/default.asp

virtual directory so it looks as separate virtual URL path

and have relevant code in that page:

<--#include file="../yourasppage.asp?content=customer1">

Either way you need to have that virtual directory to appear in URL browser

row.

Response.Redirect will show actual virtual path to your only asp page.

You can use FileSystemObject to create

that directory and file automatically on the fly

if it is not there yet.

Maybe someone has got better idea.

Cheers





---

MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.

---

You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index