douxiong3234 2011-11-20 21:54
浏览 52

Subdomain背后的逻辑在多网站SaaS上重写

I´m planning to develop a SaaS where the users can have their own subdomain with its template based page.

This is what I´ll have

  • php/MySQL web application, using Yii
  • users(tenants)
  • templates on specific folders(html, php, jpg, etc.)
  • users will define a subdomain and choose a template

This is what I need

  • This one is easily done with PHP I guess: knowing what subdomain is being used then filtering data by tenant related to subdomain and then getting the physical folder of the template chosen to use it as base URL and render the page, if I´m right, no need to answer this.
  • This one I don´t know: Keep the subdomain ALWAYS visible and everyhing filtered according to it.

So I know is going to be htaccess related in which I really don´t know much of it so I´m investigating about it.
If the code is kind of complex it would be great if at least someone may do some pseudocode or explanation of what would I need to search for.

I know also I can use a Multisite CMS or Blog and get done with it BUT we plan to expand and have specific functionality needs.

thank you

--- Edited --- Int other words, I just need the subdomain to work as wordpress.com does it in their free blogs, is it a code in the htaccess?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 wireshark抓不到vlan
    • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
    • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
    • ¥15 stata安慰剂检验作图但是真实值不出现在图上
    • ¥15 c程序不知道为什么得不到结果
    • ¥40 复杂的限制性的商函数处理
    • ¥15 程序不包含适用于入口点的静态Main方法
    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来