Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

apache server with non www vs.www problem

Posted on 2006-06-21
5
Medium Priority
?
219 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month8 days, 8 hours left to enroll

598 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