Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Making a subdomain?

    How can you do it?
    I found some code that you can place on your index.php but it doesn't work.
    Can anyone tell me how to do that?
    Please help.
    Cheers MPCODER

  • #2
    New Coder
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Anyone?

  • #3
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,456
    Thanks
    8
    Thanked 1,084 Times in 1,075 Posts
    What is the code that you found?

  • #4
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    you can't ' `make` a subdomain like that , if your DNS allows wildcard's then blah.domain.com may resolve you your www domain in which case you can examine the HTTP_HOST information ($_SERVER['HTTP_HOST'] in PHP) to decide where to redirect to & content to show ... but its still not a subdomain as such.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #5
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    It entirely depends on your hosting solution. Server management utilities like Plesk allow you to create real subdomains yourself, and adds the DNS entry automatically. However, most hosting solutions are not that flexible. The best tip is to contact your host about it.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #6
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    i am having the same prob with MPCODER...firepages, i don't really understand what to u mean "the DNS redirects it"...also..what do u mean by the DNS allows wildcards?err...maybe a little explanation on this would help me...thanks alot...
    Warm Regards,
    Mivec

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mex
    Posts
    122
    Thanks
    0
    Thanked 0 Times in 0 Posts
    As i moreless undestand, creating a sub domain as blah.domain.com, i similar as creating a domain, you have to point that subdomain to certain dns servers so anyone who types the domain can see what he is supposed to.

    for creating subdomains you have to contact your host, some host allow you to create unlimited amount of subdomains, other charge you like 5 UDS per month per domain. commonly they create fake ips, so when someone types the url, it is pointed to a directory in your host account.

    hope you understan a bit more.

    Calilo

  • #8
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks calilo, but i was thinking of creating a subdomain locally in my computer for tests. using apache, php, mysql and phpmyadmin.i know to create a subdomain, we would need to contact our host admin ppl but i wanna test some stuff locally before i can broadcast it...therefore, i am stuck here....i heard there are some code changes in the httpd.cfg in the apache file?but not sure what it is...do u have any code samples?thanks alot
    Warm Regards,
    Mivec

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mex
    Posts
    122
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I really dont know much about apache, im a mac user and i have only eddited my apache conf, to let perl execution on all the servers, i understand what you want, i did a quick research right now i think you can accomplish what you want by mod_vhost_alias, in apache conf, i really dont know how to use this, as i said i dont know much about apache, but im sure you can find more data, it is interesting what you want to do, but right now i have a bunch of needles in my back cause of chineese medicine (acupuntura) dont know the name in english, an di cant be long time here, but i will sure look for more info by tomorrow, this is the page for vhost_alias, hope you undestand it.


    http://httpd.apache.org/docs-2.0/mod/mod_vhost_alias.html


    Hope it helps you,
    Calilo


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •