The url http://somestie.com works but when going to http://www.somesite.com it is a blank page. How to fix this? Here is the V-host <VirtualHost *:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot C://appserv/www/ CustomLog logs/access.log common ServerName mysite.info ServerName www.mysite.info </VirtualHost> Never mind fixed it. just added http://www on it ServerName http://www.somesite.biz ServerName http://somesite.biz
Hi, you could also consider dropping the www part... just setup your server to redirect all such requests to domain.com. Some more information about this campaign at no-www.org
Please explain sysadm? To redirect from www.domain.com, www.domain.com must be enabled first and this is done thee way Dollar done it. BTW, I'd use a ServerAlias for the www variant, not two ServerName's
ServerAlias is an Apache directive and is independent of the operating system Apache is running on. I'm torn on the no-www.org issue. On the one hand, much of what they say is correct, web servers should definitely accept requests on both the bare domain and the www subdomain and may then choose whether to serve the page or redirect to www or the bare domain. www is annoying to type and even more so to say but many non-apache admins don't understand URLs without the www so it's more pragmatic to accommodate the majority of the world. krt is absolutely correct, if you aren't listening for www.domain.com then requests for it will simply timeout and you won't have any control over what happens to that user. On no-www.org they have an example of how you can redirect users once they have reached your webserver: RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] but I prefer to use the slight variant: RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] which allows you to add any number of ServerAlias directives and have them all redirect to the same, canonical URL.