www and no www

Discussion in 'HTML & Website Design' started by Ippon, Jul 2, 2008.

  1. #1
    Please redirect if wrong forum. My site has always been fine with the www. or without it. I must have changed something, because now without the www my site lacks color and images. Can anyone tell me what I changed and how I can fix it. Thanks Ippon www.efinancehelp.com
     
    Ippon, Jul 2, 2008 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Did you modify your root directory's .htaccess file by any chance?
     
    Dan Schulz, Jul 3, 2008 IP
  3. jprice259

    jprice259 Peon

    Messages:
    100
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yep... .htaccess file...

    If you want the www to always show up even when someone types without the www. Add this to your .htaccess file:


    RewriteEngine on

    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L,QSA]


    Cheers,
    Jesse
     
    jprice259, Jul 4, 2008 IP
  4. WebSolutions86

    WebSolutions86 Peon

    Messages:
    434
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #4
    301 redirect will redirect users from non-www to www version or vice versa

    I always use www with main domains and non-www for subdomains.

    You could do the redirect in the host settings. Depends upon your host.
     
    WebSolutions86, Jul 5, 2008 IP
  5. jprice259

    jprice259 Peon

    Messages:
    100
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Also, go onto Google webmaster tools and change your site url preference in google for the www. extension...
     
    jprice259, Jul 5, 2008 IP