• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Site Breaks Without "WWW"

#1
[eluser]BrandonDurham[/eluser]
Just completed a site for a client and discovered that if you enter the site without the "www" in the url it breaks. You'll get this message:
Quote:An Error Was Encountered
Unable to connect to your database server using the provided settings.

It works fine if you add the "www". Why would this be happening??

Here is the site in question: http://fluentcollab.org/fluent/

#2
[eluser]Tom Glover[/eluser]
This is down to the host not rooting the non www site correctly. To work around this you will need to redirect all requests to the www version through the .htaccess.

http://perishablepress.com/press/2006/01...ss-tricks/

EDIT:

Code:
# permanently redirect from non-www domain to www domain
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^domain\.tld$ [NC]
RewriteRule ^(.*)$ http://www.domain.tld/$1 [R=301,L]

#3
[eluser]BrandonDurham[/eluser]
Awesome. I'll give it a shot. Thanks!

#4
[eluser]BrandonDurham[/eluser]
Worked like a charm. Thank you.

#5
[eluser]Tom Glover[/eluser]
No Problem, We offer Hosting with out these issues, but I'm glad it worked for you.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.