Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best Practice for Setting Up Multiple Associated Websites

Status
Not open for further replies.

mickeyj2

Programmer
Jun 7, 2007
79
US
Hi,

I need to setup (7) websites. They all look alike, but one will be my "main" website with my company's branding, and the others will be "sub-domain" sites that drill down further into my various product lines. For example,


Website 1 - abcbakery.com
Website 2 - donuts.abcbakery.com
Website 3 - cakes.abcbakery.com
Website 4 - bread.abcbakery.com
Website 5 - deli.abcbakery.com
Website 6 - coffee.abcbakery.com
Website 7 - weddings.abcbakery.com



Each of my sites will have their OWN IP ADDRESS.

Is it a logical best practice to do the following directory structures if I'm hosting all of my sites on one machine?

C:\inetpub\ (where my virtual website abcbakery.com points to)
C:\inetpub\ (virtual website is donuts.abcbakery.com )
C:\inetpub\ (virtual website is cakes.abcbakery.com )
C:\inetpub\ (virtual website is bread.abcbakery.com )
C:\inetpub\ (virtual website is deli.abcbakery.com )
C:\inetpub\ (virtual website is coffee.abcbakery.com )
C:\inetpub\ (virtual website is weddings.abcbakery.com )

Then in IIS, I'll just setup each of my individual websites to point to their respective directories?

Is this cool or not? What would you do? What are the advantages and disadvantages?

Thanks in advance for any help you can provide.

mickeyj2
 
Hey, has anyone done this before? One additional question. Is it cool to assign different IP addresses to each individual subfolder (i.e., website).

Any help you can provide is appreciated.

Thanks,
mickeyj2
 
if they all look alike, why not use only one directory and then define different product directories? we have a similar set up. In our case, we have several templates that dictate what must look different. hope it helps...

 
they better be truly unique products. Google and the rest are going to actually index each sub domain seperatly. If your navigation structure is going to be exactly the same, don't do it.

If your products really do need their own sub domain for some reason I won't understand without additional details, sure but I would go about it differently. you don't need unique ip addresses, I'd just add each sub domain as host headers in IIS and then do a verification upon entry that they are in the correct domain, then display xy and z.

Here is something I posted yesterday on another list. Still makes sense here as well.


<cfset TheDomain = "#CGI.SERVER_NAME#"> and then doing a call against your database user table for such domain does work. This even allows you to offer custom domain names. xyzhomesforsale.com could bring up the same application as abchomesforsale.com using this method and checking for the servername.

When the visitor first hit's the server from a unique domain name, or sub domainname.com I set the ApplicationName to something from the database or just use their domain. I guess you could use CGI.QUERY_STRING if you need to get the info that way. I would just recommend setting up sub domains, to the point where the information displayed is exactly the same. If this is the case, SEO rule 1 is don't duplicate content so having 100 domains displaying the same 400 listings is going to look funny to google.

So in application.cfc

<cffunction name="onApplicationStart">
HomesApp_#ReturnedQueryDomain.ClientIDDigits#
</cffunction>

I now know that everything from this point forward is going to be inline with the clients domain and no one else's. Everything else can be set or gat because of this initial check and the setting of variables in the application scope. This includes things like where to store images and how records are displayed. If you always run the domain/id check along with your queries. the visitor should always only receive the currents domains information.

getlistings.cfm

<cfscript>
listing = StructNew();
listing.ID = URL.listingID;
listing.Client = APPLICATION.homesConfig.ClientIDDigits ;
rsHomeListings = APPLICATION.cfc.HomeListings.getListing(argumentCollection=listing);
</cfscript>

<cfoutput query="rsHomeListings ">
</cfoutput>

Of course they are more parts to this but the only downside I've seen so far is refreshing application scope it's self across all applications without rebooting the box.

So far it seems like loading pages with cfhttp is the best way to go about this. I figure refreshing the applications is the least of my worries, but maybe I'm wrong when there could be 100 or 1000 + applications running.

Maybe someone else has a better way of refreshing all applications on a server.

Casey
 
Hey, Falconseye and Casey. Thanks so much for these posts. This really helps me out. I'm going to review this some more and decide on the best approach. I also need to find out our Google search considerations.

Will keep you posted. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top