Daney11 Posted November 17, 2007 Share Posted November 17, 2007 Hi guys, Im not sure how to create this... Basically i want to create "fake" subdomains... http://www.mysite.com http://one.mysite.com http://two.mysite.com And i want the subdomains to point to the domain name http://www.mysite.com How would i go about doing this? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/77717-subdomain/ Share on other sites More sharing options...
trq Posted November 18, 2007 Share Posted November 18, 2007 The easiest way to do this is within your virtual-host config. See [url=http://httpd.apache.org/docs/2.0/mod/core.html#serveralias]ServerAlias Quote Link to comment https://forums.phpfreaks.com/topic/77717-subdomain/#findComment-393848 Share on other sites More sharing options...
belick Posted December 19, 2007 Share Posted December 19, 2007 I think its easier through .htaccess... if its posibile... anyone know how to do that with .htaccess? Quote Link to comment https://forums.phpfreaks.com/topic/77717-subdomain/#findComment-418130 Share on other sites More sharing options...
trq Posted December 19, 2007 Share Posted December 19, 2007 I think its easier through .htaccess... if its posibile... anyone know how to do that with .htaccess? You think its easier, yet have no idea how to do it? That makes no sense. Quote Link to comment https://forums.phpfreaks.com/topic/77717-subdomain/#findComment-418365 Share on other sites More sharing options...
The Little Guy Posted December 22, 2007 Share Posted December 22, 2007 Your host needs to allow wildcard DNS first, and it must be activated on your domain. then you can do this with .htaccess redirect. Quote Link to comment https://forums.phpfreaks.com/topic/77717-subdomain/#findComment-421252 Share on other sites More sharing options...
madmax Posted January 8, 2008 Share Posted January 8, 2008 For Apache 2.0.x - at least - the context for ServerAlias is VirtualHost and the Context for VirtualHost is the server config file so you might be a bit stuck with .htaccess on this one. http://httpd.apache.org/docs/2.0/mod/core.html#virtualhost http://httpd.apache.org/docs/2.0/mod/core.html#serveralias If you had access to the main server config file then you'd be able to do this PDQ, however as you're sticking with .htaccess I'd hazard a guess you're on a hosted account where, for very good reasons, your server admin would want to have full control the hows and whys of his/her client's use of virtual hosts. I think you will need to speak to your host webmaster unless you have a lot of time to amuse yourself trying to find more long-winded ways round this. Quote Link to comment https://forums.phpfreaks.com/topic/77717-subdomain/#findComment-434057 Share on other sites More sharing options...
belick Posted January 16, 2008 Share Posted January 16, 2008 I know that I can do it through the cpanel on my server but I need to create a host for every city in the US... so I need somthing easier... Quote Link to comment https://forums.phpfreaks.com/topic/77717-subdomain/#findComment-440502 Share on other sites More sharing options...
madmax Posted January 17, 2008 Share Posted January 17, 2008 Wildcard subdomains would, potentially cover everything in the known universe which could be described in the RFC domain name format. Can't see what the problem is. As originally stated the request appears to be nothing more than a request for wildcard redirection to one single domain. My guess there's a deeper level of unspoken requirements here. ??? Quote Link to comment https://forums.phpfreaks.com/topic/77717-subdomain/#findComment-441943 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.