Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts

    Arrow My page only displays correctly with www. infront =(

    Hello, my webpage only displays correctly when I have www. in front of my domain name. Without the www. it'll have no favicon, the background is no longer full screen. I put my homepage in index.html, do I suppose to do something to default.html? I am a complete noob lol, please help me fix this problem.

    If you need to know what webhost I have its, hostgator. Thankyou

  • #2
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could put an .htaccess file in the folder that has the index.html file in it. This would would force the browser to always have a www in thr url

    Crean an .htaccess file with the folowing and replace website.com with your domain name:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www.website.com$
    RewriteRule ^(.*)$ http://www.website.com/$1 [R=301]

    This is what I do for my domain at www.gocreateawebsite.com
    Last edited by gcaweb; 02-25-2011 at 12:11 AM.

  • #3
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts

    Smile

    Ok thanks man, I'll will try that and tell you after how it goes

  • #4
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts
    Wait it says I can't create a file called that bcuz theres already an .htaccess file I cant even find it tho. I was trying to make a file in the /public_html folder btw.

    EDit: Nvm I found it, I had to view the hidden pages also. =S lol alright now let me test it if it will work.
    Last edited by crank01; 02-25-2011 at 12:21 AM.

  • #5
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts
    Works really nicely thanks man. Do you happen to know what might have been the problem as to why it was only showing the favicon and background for "www."? Just curious as to why it would mess up with the www


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •