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 12 of 12
  1. #1
    New to the CF scene
    Join Date
    Apr 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Website does not work without 'www' prefix

    My website, www.napalmdeath.be, does not work without typing the 'www' prefix before 'napalmdeath.be'. How can I fix this? Without the 'www', it directs to an Apache page saying the servers are good or something. I want 'napalmdeath.be' to redirect to 'www.napalmdeath.be' at least..
    Last edited by napalmdeath; 04-04-2007 at 03:45 PM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You will need to use .htaccess.

    1. Make a new text document, save it as htaccess.txt
    2. Put this in it
    Code:
    Options +FollowSymLinks 
    
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^napalmdeath.be [NC] 
    RewriteRule ^(.*)$ http://www.napalmdeath.be/$1 [L,R=301]
    3. Upload htaccess.txt to your webhost using an ftp program.
    4. Using the ftp program rename the file to .htaccess WITHOUT the extension.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    Oct 2005
    Location
    Right Here
    Posts
    654
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Or just configure you php.ini file to allow www or not.

  • #4
    New to the CF scene
    Join Date
    Apr 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, it has been fixed, cheers for the info

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote Originally Posted by napalmdeath View Post
    ok, it has been fixed, cheers for the info
    Which solution did you use? And why the heck did you remove the problem. Others need help to not just you. Don't be selfish. Others could have benefited from the knowing the solution to the original problem.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,011
    Thanks
    2
    Thanked 312 Times in 304 Posts
    This must have been another of the "I Want" members, where they go running to a forum to get some immediate "I Want" answer, and they aren't, can't or don't give any thought to giving anything back and would never become a contributing member anyway.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #7
    Regular Coder
    Join Date
    Oct 2005
    Location
    Right Here
    Posts
    654
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yea, gotta love selfishness

  • #8
    New to the CF scene
    Join Date
    Apr 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    whoa whoa whoa... I didn't know it was such a big deal... You guys didn't have to attack me like blood-thirsty sharks... but sorry if I appeared as 'selfish'... I didn't know. I created the original message again...
    Last edited by napalmdeath; 04-04-2007 at 03:49 PM.

  • #9
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by napalmdeath View Post
    whoa whoa whoa... I didn't know it was such a big deal... You guys didn't have to attack me like blood-thirsty sharks... but sorry if I appeared as 'selfish'... I didn't know. I created the original message again...
    Yeah they might of gotten on your case a little too much but generally on most forums, editing out your original question is considered rather impolite. Since being able to search forums for previous questions that might solve your current problem is one of the main ideas.

    Just don't do it again and you'll be fine.
    OracleGuy

  • #10
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,011
    Thanks
    2
    Thanked 312 Times in 304 Posts
    The forum's "edit" time setting is a bit too long anyway. All it really needs to be is enough time to catch typos and add follow up information. 30min to 1hr would be enough, though in this thread the time from the original post to the "fix and edit" was just under one hour.

    There was another recent thread that suffered from the same "fix" and "I don't want to share anything I found out" problem as well. In fact, unless I did not read everything, we don't actually know what was done to fix the problem in this thread.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #11
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Thanks

    Thank you...all

  • #12
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by oracleguy View Post
    Yeah they might of gotten on your case a little too much but generally on most forums, editing out your original question is considered rather impolite. Since being able to search forums for previous questions that might solve your current problem is one of the main ideas.

    Just don't do it again and you'll be fine.
    People actually SEARCH forums for similar problems BEFORE they post?....Wow thats news to me...lol

    I think I stated in another thread, that new forum members should be required to search for a period of time before they can actually post a new thread...lol
    Teed


  •  

    Posting Permissions

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