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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
that can be done in httpd.conf e.g.
ServerName www.userName.mysite.com
RewriteCond %{HTTP_HOST} ^www\.userName\.mysite\.com$ [NC]