candyce
-
6/26/2012 8:29:54 PM
Subdomain woes - any ideas?
I am recreating a website for a client using Kentico 6 and aspx templates. The client has several thousand distributors who are used to entering their distributor ID prior to the domain name, like a sub domain. For example, 12345.mydomain.com. The sub domain does not actually exist. The only reason the distributor ID is being passed like a sub domain is so it can be parsed by some JSON script on the page. The JSON script parses the URL to retrieve the distributor's ID number and looks up the distributor's name in a database maintained by a 3rd party application. The distributor ID has to be tracked in the Kentico system because it is used for placing orders in a 3rd party shopping cart.
The distributors are not in the Kentico database as users. Distributor data is maintained by a 3rd party application.
Kentico allows you to create licenses for sub domains if the page content stays the same. I received some code from tech support to create a license for 12345.mydomain.com. The license is created, but using the URL still doesn't work. However, this isn't a good solution because I would have to create several thousand licenses!
So, my next idea was to create a new application, using a different domain name not used by Kentico CMS. I can run the code to parse the URL and get the distributor's name, but how can I get the distributor's name and ID into the Kentico CMS pages? I tried saving it to a session variable, but because I am doing a redirect the variable is deleted.
I will appreciate any ideas you have. Telling the client they have to change the way their distributors enter the URL is not an option.
|