jola Posted June 30, 2009 Share Posted June 30, 2009 Hello, I need your help concerning building a small script which will direct a person to wildcard subdomain. There should be an input field, a kind of <input name="letters" type="text" /> and it should direct a person to "letters" wildcard subdomain. I was looking for a solution for several hours, in vain still... I don't know much php, so if you can, please help me. Jola Quote Link to comment https://forums.phpfreaks.com/topic/164259-go-to-wildcard-subdomain/ Share on other sites More sharing options...
HuggieBear Posted June 30, 2009 Share Posted June 30, 2009 Give an example of what they'd type in the form field and what URL they'd be directed to. Quote Link to comment https://forums.phpfreaks.com/topic/164259-go-to-wildcard-subdomain/#findComment-866454 Share on other sites More sharing options...
jola Posted June 30, 2009 Author Share Posted June 30, 2009 The problem is that I need a script that will direct a person to a wildcard domain, that's why I thought of input field. So, what a person puts in the input field, should give a link to the subdomain, eg. A user writes: abc, and it should direct him to abc.domain.com Is it possible? How to do it? Quote Link to comment https://forums.phpfreaks.com/topic/164259-go-to-wildcard-subdomain/#findComment-866459 Share on other sites More sharing options...
HuggieBear Posted June 30, 2009 Share Posted June 30, 2009 Are you saying you want users to be able to create sub-domains from a form on the site, or just that they should be re-directed to already existing sub-domains? Quote Link to comment https://forums.phpfreaks.com/topic/164259-go-to-wildcard-subdomain/#findComment-866462 Share on other sites More sharing options...
jola Posted June 30, 2009 Author Share Posted June 30, 2009 HuggieBear, thank you for your replies The subdomains are wildcard domains, they show the same page as the base domain with a few changes. I just don't know how to direct users there in the easiest way ;-) Quote Link to comment https://forums.phpfreaks.com/topic/164259-go-to-wildcard-subdomain/#findComment-866467 Share on other sites More sharing options...
jola Posted June 30, 2009 Author Share Posted June 30, 2009 Can anyone help, please? Quote Link to comment https://forums.phpfreaks.com/topic/164259-go-to-wildcard-subdomain/#findComment-866582 Share on other sites More sharing options...
cunoodle2 Posted June 30, 2009 Share Posted June 30, 2009 $sub = $input."domain.com"; header($sub); Quote Link to comment https://forums.phpfreaks.com/topic/164259-go-to-wildcard-subdomain/#findComment-866586 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.