View Single Post
  #10 (permalink)  
Old 01-17-2008, 06:29 PM
lukkyjay lukkyjay is offline
WebProWorld Member
 

Join Date: Mar 2006
Location: Colorado
Posts: 90
lukkyjay RepRank 0
Default Re: Apache Server Specific

Quote:
Originally Posted by wige View Post
Apache Server Specific
www vs non-www
Add the following code to the .htaccess file in the root folder of your web content, or to the appropriate area of your server configuration, after the RewriteEngine on directive:
Code:
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
I've tried it a few times, but it hasn't worked yet. Maybe it has something to do with what is in my .htaccess already:
Code:
ErrorDocument 500 http://www.insuranceshoppers.net/500.html
Should I put it before the "ErrorDocument" line? Including the RewriteEngine on directive, how should it look?
Reply With Quote