这似乎是一个常见的请求,但我无法找到关于做这样的事情的明确指示.
我想要一个子域来触发我的CI安装上的某个控制器.例如:
students.mysite.com:会打开mysite.com/students(技术上:mysite.com/index.php/students.控制器: 学生)
teachers.mysite.com:会打开mysite.com/teachers
在深入穿越时保留子域.例如:
students.mysite.com/help:会打开mysite.com/students/help(控制器:students(),方法:help())
students.mysite.com/help/contact:会打开mysite.com/students/help/contact(控制器:students(),方法:help(),参数:"contact")
students.mysite.com/help/contact/email:会打开mysite.com/students/help/contact(控制器:students(),方法:help(),参数:"contact","email")
我意识到something.mysite.com现在返回错误.所以我认为:
第1步将允许anything.mysite.com返回根(mysite.com/index.php)
第2步将读取子域并调用该控制器
第3步将在第一个"/"之后读取第一个参数并调用控制器的该方法,并将剩余的url部分作为参数传递
我想我真的很难过第一步.我在共享主机帐户上,这是我可以通过CPanel做的事情吗?我尝试在没有任何运气的情况下为*.mysite.com添加子域名(除非我只需要等待更长时间才能进行传播,但我觉得错误的可能性更大).
回到我家的WAMP安装,我会更改httpd.conf,对吧?我可以在不修改该文件的情况下实现此效果(因为我可能不能,因为我使用webhostinghub.com共享)
哎呀,谢谢你的时间! - …
我有个问题。我正在尝试在一个wordpress实例下设置两个域。
例如,我在www.site1.com上有一个wordpress网站。
我还有一个名为www.site2.com的域。现在,我想在www.site2.com上的www.site1.com下运行相同的wordpress网站。
我尝试使用wordpress域mu映射插件
http://wordpress.org/plugins/wordpress-mu-domain-mapping/installation/
但它只允许我访问www.site1.com的子域或目录
有人可以帮忙吗?