开发者

Using the URI to create customer specific look'n'feel

There are customers that want to customize to brand my product, while have me conitue to manage and maintain the site. I have seen people doing this by creating customer specific URIs, such as:

    <customer1>.WebSite.com
    <customer2>.WebSite.com
    <customer3>.WebSite.com
    ...

Each customerX identifier is obv开发者_高级运维iously used to load a CSS/HTML composition that would best match the customer's requirements.

How would this be done in ASP.NET? Any serious gotchas I should be aware of? Is it difficult to maintain such an offering if customers are heavily reliant on JS and CSS hacks?


It's generally much easier to do the customization as a function of the logged in use rather than using domain name structures like this.

If you do wish to go down this path you'll need to set up a wildcard DNS mapping at your DNS provider, you'll also need to examine the Request object either in a custom httpmodule or in some master page or base page class and then set an appropriate CSS stylesheet.

If you are using HTTPS on your site you'll have many more problems to contend with.


What do you mean by JS and CSS hacks? You should load different CSS sheets and JS files for each customer site.


The basic idea I would use:

  • Is to have a master/template 'site' which contains the default style/content.

  • Set up a site for each customer that points it's resource by default to the master.

  • When the customer wants to customize it, copy it to their site. Change the references in the customer's site to their copy of the resource.


One thing you'll have to watch out for is the customer screwing up their version, and malicious changes to the files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜