Solved

apache server with non www vs.www problem

Posted on 2006-06-21
5
216 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 300 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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

Suggested Solutions

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

726 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