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?
that can be done in httpd.conf e.g.
ServerName www.userName.mysite.com
RewriteCond %{HTTP_HOST} ^www\.userName\.mysite\.com$ [NC]
来源:https://stackoverflow.com/questions/10351085/create-a-sub-website-of-the-parent-website-for-each-usersub-domain-or-subfolder