Forum Moderators: phranque

Message Too Old, No Replies

htaccess subdomains?

         

iamjava

7:57 pm on Dec 21, 2009 (gmt 0)

10+ Year Member



I need help with this. What I need to do is find a script that will do the following:

[testusername.example.com...]

What I need it to do is the select testusername, like http://example.com/members.php?user=1

Thanks for your help. :)

g1smd

10:02 pm on Dec 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



A forum search for "rewriterule" and "sub-domain" or "subdomain" should find thousands of prior examples.

iamjava

10:51 pm on Dec 21, 2009 (gmt 0)

10+ Year Member



All I can find is making subdomains redirect to a directory..

jdMorgan

11:35 pm on Dec 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How about a search for "rewrite subdomain script RewriteCond HTTP_HOST .php script [google.com]"

There are scores if not hundreds of previous threads on this function, and they should help to get you started and to focus your questions.

Jim

iamjava

1:29 am on Dec 22, 2009 (gmt 0)

10+ Year Member



Sorry for my ignorance, I know hardly anything about htaccess, which makes searching for the script I want that much harder.

g1smd

1:49 am on Dec 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There won't be anything pre-written that you can simply cut and paste to your server, but there are hundreds of posts with code that matches similar requirements to yours, with differences mostly in the naming and other such details. It is important that you fully understand every character in the code that you install on your server as one tiny mistake can destroy your search rankings.