1 blogger4832 Jul 18, 2005 08:00
3 blogger4832 Jul 19, 2005 07:09
Yes, there is a www in the config file.
One other thing I discovered.
If I go to www.whatsnextnetwork.com/health, for example, the www will not appear.
If I go to www.whatsnextnetwork.com/health/index.php (by clicking on the title of the blog, for example), then the www is displayed.
Is there another file I need to add the www to?
Does it make a difference that Blog A is my default blog, rather than the main blog?
4 elpie Jul 19, 2005 15:47
I know this doesn't answer your question, but I am wondering why you are using www at all?
If your host supports domains resolving to the deprecated form, ie.domain.com not www.domain.com - why not just use that?
www. is effectively a subdomain and is really outdated these days.
You could check with your host, but most hosts these days set servers up so visitors can type www. or not and still get your pages.
Your server sounds like this is already set up. The reason you may be getting www in the page coming off your link is that perhaps your link contains www - just a thought.
5 blogger4832 Jul 21, 2005 00:03
Everything seems to work fine without the www, but I was curious to know why sometimes it appeared, and other times did not.
For example, why does the www appear for this: www.whatsnextnetwork.com/technology/index.php
but not for this: www.whatsnextnetwork.com/technology
6 elpie Jul 21, 2005 00:18
Perhaps because you hard-coded the www into the link?
7 kweb Jul 21, 2005 21:03
It appears to be an issue with your Apache server. You may not have noticed, but if you add the trailing slash (http://www.whatsnextnetwork.com/technology/), the www will not disappear. The reason is a combination of the way web servers handle directory requests and the way Apache is configured.
A little background:
When you create a URL that points to a directory, the proper way to form the URL is with a trailing slash, signifying to the web server that you are asking for the index (or default file) of a directory, as opposed to asking for a specific file. When you don't include a trailing slash, the web server first looks for a file with the name you asked for (in this case, "technology"). When it doesn't find a file, it checks to see if there is a directory by that name, and if so, it sends your browser a 301 response telling it that the resource it has requested want has moved to a new URL (which includes the trailing slash). Your browser then has to make another request with the trailing slash so that the server will serve the content you are looking for.
For this reason, it's good practice to always include a trailing slash when you create a url that points to a directory. It saves the browser and the server from unnecessary processing time and from making extra requests. You probably won't ever notice the difference on the client side, especially in a broadband world, but a high traffic website would see some improvements on the server in terms of the number of requests that have to be served.
So what does this have to do with the www on your URL? Well, nothing directly, except that it appears your Apache server seems to think that the proper hostname for your website is whatsnextnetwork.com, not www.whatsnextnetwork.com, so it's making the adjustment in its 301 response to the browser. That's why it only happens when you don't include a trailing slash and have to be redirected. Here's the request and response block so you can see the difference:
**********REQUEST**********
GET /technology HTTP/1.1
Host: www.whatsnextnetwork.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive**********RESPONSE**********
HTTP/1.1 301 Moved Permanently
Date: Thu, 21 Jul 2005 18:41:17 GMT
Server: Apache/1.3.33 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.11 mod_ssl/2.8.22 OpenSSL/0.9.7g
Location: http://whatsnextnetwork.com/technology/
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1140
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>301 Moved Permanently</TITLE>
</HEAD><BODY>
<H1>Moved Permanently</H1>
The document has moved <A HREF="http://whatsnextnetwork.com/technology/">here</A>.<P>
<HR>
<ADDRESS>Apache/1.3.33 Server at whatsnextnetwork.com Port 80</ADDRESS>
</BODY></HTML>
The answer is to either change Apache to think that it should be using the www, or change your blog (and all your links) to think that it should not be. It just needs to be consistent one way or another.
8 blogger4832 Jul 22, 2005 07:58
Thanks for the info.
It now makes sense.
I will change the links to be more consistent.
What have you put in the conf/_config.php file on line 63
Is there a www ?