elduderino Posted February 16, 2008 Share Posted February 16, 2008 HI, I've created a subdomain of my site using a vitual host...so i now have a site that you can visit by going subdomain.domain.com.....problem is if i put www.subdomain.domain.com i get the servers default page....can anyone tell me why using the www gives me a different page? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/91386-using-www-gives-me-a-different-page/ Share on other sites More sharing options...
uniflare Posted February 17, 2008 Share Posted February 17, 2008 i believe this is misconception that www. is recognized as prefix and not a subdomain (if u know what i mean), you will have to create an extra virtual host www.subdomain.domain.com with the exact same details and the other virtualhost. i believe www. is recognized as a subdomain of the domain name (domain.com). Quote Link to comment https://forums.phpfreaks.com/topic/91386-using-www-gives-me-a-different-page/#findComment-468697 Share on other sites More sharing options...
wildteen88 Posted February 17, 2008 Share Posted February 17, 2008 you will have to create an extra virtual host www.subdomain.domain.com with the exact same details and the other virtualhost. A better way would be to set the ServerAlias direcitive to www.subdomain.domain.com within the virtualhost for subdomain.domain.com <VirtualHost *:80> DocumentRoot /path/here/ ServerName subdomain.domain.com ServerAlias www.subdomain.domain.com </VirtualHost> Quote Link to comment https://forums.phpfreaks.com/topic/91386-using-www-gives-me-a-different-page/#findComment-468746 Share on other sites More sharing options...
uniflare Posted February 17, 2008 Share Posted February 17, 2008 ah silly me lol Quote Link to comment https://forums.phpfreaks.com/topic/91386-using-www-gives-me-a-different-page/#findComment-468776 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.