Hi guys,
Does anybody know how to redirect using .htacess? I have a site where I allow people to sign in and create their own website. Earlier I have allowed them to access their personal site through www.domain.com/username.
But now I have changed that method where, I will create each of them a sub domain so they can access their site using username.domain.com.
Now the problem is with the members who are already sign up with me. Since the old method won’t work any more, they cannot access their site.
What I’m trying to do is create .htaccess file and redirect all the www.domain.com/username to username.domain.com. I cannot just hardcode this in the .htaccess file since the usernames differ from user to user.
Does anybody know how to write the .htaccess which will take care of my problem?
Thanks in advanced.
Regards,
Niroshan