Jump to content


Photo

Mod_rewrite help: sub-domain point to php script


  • Please log in to reply
3 replies to this topic

#1 KNK

KNK
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationSouthern California, USA

Posted 20 August 2003 - 03:22 AM

Hello everyone,

I been trying to figure this out all day and it\'s driving me crazy. I have read the mod_rewrite doc and that hasn\'t helped me ... I must be having a long brain fart or just dumb.

I bee trying to figre out how to do this:

http://USERNAME.domain.com

to point to

http://www.domain.co...p?user=USERNAME

The have another script as well that lists the buddies of that user ... but I am not sure how I would use that script as a sub-domain as well.

for example

http://www.domain.co...p?user=USERNAME



Can any one help me out with this? I am really confused. :cry:

#2 DarthViper3k

DarthViper3k
  • Members
  • PipPipPip
  • Advanced Member
  • 50 posts

Posted 22 August 2003 - 06:21 AM

read the Virtual Hosts tutorial here on this website man

that might help some.....

but they must be registed with a DNS server to work
[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]
switch($php) {
    case = \"given\" : {
       $website = 1;
       break;
    }     case = \"taught\" : {        $website = lifetime;        break;     } } [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] The lazy never learn. The lazy are the downfall of many great things. Take the time to learn.

#3 gizmola

gizmola
  • Administrators
  • Advanced Member
  • 4,664 posts
  • LocationLos Angeles, CA USA

Posted 22 August 2003 - 04:40 PM

Yeah you can\'t get this to work unless the subdomain can be resolved via DNS. What you *could* get working with mod_rewrite would be support for:

http://www.yoursite.com/username

#4 KNK

KNK
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationSouthern California, USA

Posted 26 August 2003 - 09:01 AM

I guess I am going to have o do domain.com/username/ :(

Thanks everyone :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users