SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: All of a sudden WWW not working?
-
Mar 26, 2008, 13:21 #1
- Join Date
- Oct 2005
- Location
- Nashville, TN
- Posts
- 628
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
All of a sudden WWW not working?
My domain pulls up just fine without WWW (ie. domain.com) but when users inputs www.domain.com the I get a Server Not Found error.
I tried doing a force rewrite with .htaccess and:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.##domain##\.com$ [NC]
RewriteRule ^.*$ http://##domain##.com%{REQUEST_URI} [R=301,L]
but it doesn't solve the problem.
Any suggestions?
Thanks
jw
-
Mar 26, 2008, 14:49 #2
- Join Date
- Feb 2002
- Location
- Auckland
- Posts
- 14,692
- Mentioned
- 20 Post(s)
- Tagged
- 3 Thread(s)
hifi,
The problem is within your DNS setup which should be contained within a control panel (it's DANGEROUS to mess with DNS records unless you know what you're doing!). If your site is hosted, your host can make the changes (to enable both www and non-www) for you but, to have both available to your site's DocumentRoot (where your .htaccess can access the {REQUEST_URI}), the server needs to know where it is (which it does via the DNS record).
Regards,
DKDavid K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
Client and (unpaid) WHB Ambassador
mod_rewrite Tutorial Article (setup, config, test & write
mod_rewrite regex w/sample code) and Code Generator
-
Mar 26, 2008, 14:57 #3
- Join Date
- Oct 2005
- Location
- Nashville, TN
- Posts
- 628
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
DK,
thanks for your input. I did check my DNS right off and everything is setup as to speck with the other 38 domains on my dedicated box. There is nothing different. In particular is the CNAME record tied to the www entry. It's all identical to the functioning sites on my server.
I also checked the httpd.include configuration file which has everything the way it is supposed to be.
Still clueless.
thanks
jon
-
Mar 26, 2008, 14:59 #4
- Join Date
- Mar 2008
- Posts
- 8
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Have you checked the Apache configuration file for a ServerAlias directive? Try putting one in for www.yoursite if it's not there already.
-
Mar 26, 2008, 15:28 #5
- Join Date
- Feb 2002
- Location
- Auckland
- Posts
- 14,692
- Mentioned
- 20 Post(s)
- Tagged
- 3 Thread(s)
hifi,
Besides the www record, I also have a * A record assigned to my IP address. The www record will provide the www "subdomain" while the * will provide the non-www.
Regards,
DKDavid K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
Client and (unpaid) WHB Ambassador
mod_rewrite Tutorial Article (setup, config, test & write
mod_rewrite regex w/sample code) and Code Generator
Bookmarks