创建父网站的子网站为每个用户(子域或子文件夹) [英] create a sub website of the parent website for each user(sub domain or subfolder)

查看:104
本文介绍了创建父网站的子网站为每个用户(子域或子文件夹)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户问我要为每个用户创建一个新的子文件夹或子目录。我的主要网址是像 www.mysite.com ,创建一个用户后,用户应该能够访问它 www.mysite.com/userName www.userName.mysite.com 。是否有可能通过JSP做的,我不知道确切应该使用在谷歌搜索这个问题什么关键词。我用JSP,的Apache Tomcat 5.5,MySQL 5.0中对我的发展。我一定要所有的内容复制子做到这一点?如果是在那里我能得到一些帮助或教程?

My client asked me to create a new sub folder or sub directory for each user. My main URL is like www.mysite.com, after creating a user the user should be able to access it as www.mysite.com/userName or www.userName.mysite.com. Is it possible to do through JSP, i dont know exact what key words should be used to search in google for this problem. I use JSP, Apache tomcat 5.5, mysql 5.0 for my development. Do i have to copy all the contents to subfolder do this? If so where i could get some help or tutorial?

推荐答案

这可在httpd.conf做例如

that can be done in httpd.conf e.g.

ServerName www.userName.mysite.com
RewriteCond %{HTTP_HOST} ^www\.userName\.mysite\.com$ [NC]

这篇关于创建父网站的子网站为每个用户(子域或子文件夹)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆