Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

automatic sub domain creation

  • 22-08-2008 8:03pm
    #1
    Registered Users, Registered Users 2 Posts: 648 ✭✭✭


    hi

    im working on a php site - i want to be able to create subdomains easily from my php script so as they redirect to pages on my site

    eg

    one.domain.com -> index.php?user=one
    john.domain.com -> index.php?user=john


    anyone know how to do this?

    many thanks


Comments

  • Registered Users, Registered Users 2 Posts: 3,889 ✭✭✭cgarvey


    Use wildchar/wildcard DNS ( I.e. *.domain.com > 1.2.3.4 ) and either use the host request header in your PHP scripts to see what was domain accessed, or use mod_rewrite in a .htaccess to do a redirect.

    Your domain host/registrar/reseller will need to support wildchar/wildcard DNS records (and most big ones do). If not you can move your DNS to a more capable provider (and still use your current host, if you like).

    Your host will also need to have support for the wildchar/wildcard sub-domain in their web server config (or maybe a fixed IP address would be an alternative, even if it does cost a bit more).


Advertisement