Forum Moderators: phranque

Message Too Old, No Replies

Subdomain help

         

shesma

4:05 pm on Jan 13, 2006 (gmt 0)

10+ Year Member



Hello,
I am new to apache server scripting. What I have in mind is to direct UserA.domain.com to www.domain.com/users/UserA. I've read in some forums that this has to do with .htaccess file

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,

jdMorgan

5:13 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



shesma,

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

shesma

5:59 pm on Jan 13, 2006 (gmt 0)

10+ Year Member



Thanks for guiding me to what to do. :)

Do you have any shared hosting companies that offer wildcard subdomain service with their plans? I need something with around 20GB webspace.

jdMorgan

7:33 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm sorry I can't make a recommedation. We don't allow site reviews or hosting reviews here, because it's impossible to know what's true and what is not. Most high-end shared virtual hosting with unique IP address plans offer this capability by default -- those in the $15 to $25/month rate range, at least. Look around for your required disk space, bandwidth, and software support (MySQL, PHP, PERL, SSI, e-mail, etc.) needs, narrow down the choices, and then phone up their sales department and ask. If they can't answer your question, ask to speak with a supervisor in tech support.

Jim