?
Solved

apache server with non www vs.www problem

Posted on 2006-06-21
5
Medium Priority
?
218 Views
Last Modified: 2010-03-04
ok   i have website  but when some types  http://www.jdcamp.org   vs.   http://jdcamp.org   one wikk work but the other will not  Help how do i fix this
0
Comment
Question by:jcw20
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 57

Expert Comment

by:giltjr
ID: 16956708
O.K.  Looks like you are using Apache and you have www.jdcamp.org setup as a virtual server, but you do not have jdcamp.org setup as a virtrual server so it is getting the default Apache web page.

You need to setup jdcamp.org up as a virtual server also.
0
 
LVL 43

Accepted Solution

by:
ravenpl earned 900 total points
ID: 16958763
Or make an alias within VirtualHost, eg.

ServerName www.jdcamp.org
ServerAlias jdcamp.org
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 16959029
jcw20 - I had answered this in your original question.  

You can use a ServerAlias as mentioned, or you can set up a second virtual server entry for the www.jdcamp.org version.

I should mention that while ServerAlias is the built in function in Apache to do this, search engines often penalize you for having multiple domains or subdomains pointing to the same site, because of the abuse of this concept.  Same goes for having mulitple domains subdomains that simply point to the same site.

Therefore, for search engine optimization purposes, it makes more sense to set up a second entry, and do a permanent redirect like this:

<VirtualHost xxx.xxx.xxx.xxx:80>
    ServerName www.jdcamp.org
    (... )
</VirtualHost>

<VirtualHost site.com:80>
    ServerName jdcamp.org
    Redirect Permanent / http://www.jdcamp.org
</VirtualHost>


0
 
LVL 43

Expert Comment

by:ravenpl
ID: 16959053
periwinkle: it has one drawback, what if somebody would want visit
http://jdcamp.org/subpage/
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 16959144
Ravenpl - good catch - I forgot the trailing slash.  It should be:

<VirtualHost site.com:80>
    ServerName jdcamp.org
    Redirect Permanent / http://www.jdcamp.org/
</VirtualHost>

(works on my server).
0

Featured Post

ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question