Forum Moderators: phranque
Is it possible to take userA as a variable and direct it to the desired path? I want apache to take whatever comes befor .domain.com (in theis case UserA) and direct it to domain.com/users/UserA (UserA is the var) so there is no need to add each one of the users in the .htaccess file
I don't want the address bar to show domain.com/users/UserA after the process is done, I want it to read the files under it and keeping userA.domain.com in address bar. i.e domain.com/user/UserA/about.html would be the same as UserA.domain.com/about.html
I am using a shared hosting and the onely access I have is to the .htaccess file
Regards,
Welcome to WebmasterWorld!
We have dozens of threads here on the subject, with several good solutions. However, before investing the time in coding, you should be sure that your host will allow "wildcard subdomains" to resolve to your 'account' and that you can configure your DNS zone file to point all subdomains to your server's IP address.
After those two pieces are in place, try searching WebmasterWorld for subdomain subdirectory rewritecond http_host rewriterule [google.com] and similar keyword phrases. The resulting threads will help you find the right solution.
Jim
Jim