Link to home
Start Free TrialLog in
Avatar of Barry Jones
Barry JonesFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Sharing ASP Code Library Between Subdomains

Hi.

I have one master website (mydomain.co.uk), and am building a regionalised website network.  There will be a separate website for each region:

london.mydomain.co.uk
birmingham.mydomain.co.uk
etc

There will be close to 40 subdomains in all.

There will be a central database, and central admin/cms system, but each sub domain will display content relevant to the region/sub domain.

I have not much experience with sub domains, and as this is a large project with minimal staffing, I need to get this right.  I need to minimize the amount of administration and coding work that is subsite-dependent.  For example I don't want to maintain separate sub folders of asp include files (my code library).  I want to use a central location that all sub domains can access, without jeopardizing the folder security on the web server.

The web server is iis6 running on a win2003 box, and the application is Classic ASP / SQL 2000.  

My questions really are:

1) Is there a better overall solution to what I am trying to achieve?
2) How can I safely share a common library of application files (css, js, asp, graphics)
3) Maintain a separate application (global.asa) for each sub domain, but also utilize a central global.asa?

Thanks,

TheFoot
Avatar of kevp75
kevp75
Flag of United States of America image

1-2) You could run everything from the database.  Store your individual site configurations in individual XML files.  Do some url REWriting so no-one sees that you are running a centralized app
3) I would stay away form using a global.asa file...too many issues with events not firing when they should
Avatar of Barry Jones

ASKER

Thanks for your reply.

That makes sense.  How does URL rewriting affect search engines and seo?  Do you also mean to store graphics and the actual asp include files as binary in the database?  I couldnt store all of them, and it wouldnt make sense to store some, but not all.  How do I rewrite URLs in IIS anyhow?

I see the advantage in storing global app configuration as xml or whatever, as opposed to global.asa.  I would still need individual global.asa's for session stuff no?

TheFoot
ASKER CERTIFIED SOLUTION
Avatar of kevp75
kevp75
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok I understand.  That happens to some degree now, except that I use global.asa for constant values, and session variables.

I will look into this URL rewriting a bit more - thanks for the advice.  Any ideas on how to share the application files?  Specifically I need to share javascript files, css files and asp code libraries.  I only want to store them in one location, and have all subdomains have access to them.

Thanks, TheFoot
OK I am going to store all shared code in a subdomain, and map a virtual directory called "code" to it from each other subdomain.  That should work shouldn't it?

TheFoot
it should do the trick