flashjordan
asked on
ht access mod rewrite subdomain to variable
Hi,
I am looking for some help with a new site I am developing. What I need to do is have members to the site being able to have their own subdomain for each account: for example
account1.XXX.com
account2.XXX.com
account3.XXX.com
What I have been looking at is being able to use PHP to write the htaccess file and rewrite the URL to a URL with a variable with out actually creating the subdomains. I supose like creating a fake subdomain for each account holder.
Therefore I think the way to do it is with .htaccess to create something like if the user enters
account1.XXX.com they get redirected to
account1.XXX.com/index.php /?a=1234 where alll the information for the account is pulled from a mysql database using the variable 1234
What I have no clue how to do and after searching the web I cannot work out how to do the subdomain rewrite of this.
Any help to get me going would be great
Thanks
I am looking for some help with a new site I am developing. What I need to do is have members to the site being able to have their own subdomain for each account: for example
account1.XXX.com
account2.XXX.com
account3.XXX.com
What I have been looking at is being able to use PHP to write the htaccess file and rewrite the URL to a URL with a variable with out actually creating the subdomains. I supose like creating a fake subdomain for each account holder.
Therefore I think the way to do it is with .htaccess to create something like if the user enters
account1.XXX.com they get redirected to
account1.XXX.com/index.php
What I have no clue how to do and after searching the web I cannot work out how to do the subdomain rewrite of this.
Any help to get me going would be great
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER