http://www.mydomain.com not working properly - but http://mydomain.com is?

Discussion in 'Site & Server Administration' started by heweaver, Jul 19, 2008.

  1. #1
    I just switched to 110mb.com as my new host a few days ago... I just changed about 5 days ago and since I changed, I noticed something peculiar.

    My site is located at http://heweaver.110mb.com

    I have a domain name registered that I pointed to it, http://www.haroldweaver.com . (I was previously on another free host and had my domain name pointing there). I never had any issues when the site was with my previous host.

    If you go directly to http://heweaver.110mb.com or to http://haroldweaver.com then the site works great. You can sign into the forums (phpbb3) and everything works everywhere (that I have noticed).

    If you go to www.haroldweaver.com (with the WWW) then if you sign in, it will say "You are signed in, returning to main page" and it will return to the main page but you are not signed in.
    If you try to create a new user at the http://www.haroldweaver.com then you get an error that says:

    The submitted form was invalid. Try submitting again.

    It works great at the http://haroldweaver.com or http://heweaver.110mb.com site. But when you access the page via www. prefix, you can't sign in or create a new user. I also noticed that sometimes when trying to access different pages at http://www.haroldweaver.com and am signing in, occasionally it will re-direct me to the http://haroldweaver.com site without the www. prefix, at which point all the rest of the links access the site without the prefix.

    What could be causing this? I have posted in the phpbb forums as well, but I have never seen this behavior. Its almost like the cookies or something cannot work properly with the http://www.haroldweaver.com ... but the same functions work great from it at its two other names - http://haroldweaver.com and http://heweaver.110mb.com . Since the php codes work great from those two names, that tells me there isn't something in there that should be hard coded for http://haroldweaver.com - otherwise it would not work with the http://heweaver.110mb.com? I am not sure where to begin to check.

    For now, I temporarily modified my .htaccess to make the first page it tries to load be a php re-direct page which throws it to my site at http://haroldweaver.com and directly to the portal.php I have for the main page content so they are not using a www. prefix, but I hope to remove that as soon as I find out whats causing it because I am afraid that any kind of re-directs like that COULD possibly affect my search engine listings, I heard that many will remove a site if the main page re-loads to another page too quickly...but I hope to get this figured out quickly enough that it shouldn't matter.

    I know this isn't a PHPBB support forum, but just to let you know, since I noticed this problem, I have tried going into the settings and first trying all places where I may possibly enter my URL and changed them to http://haroldweaver.com - then I would clear the forum and local browser cache's and try it, same issues. I then changed them all to http://www.haroldweaver.com and repeated the process, still no change. I then tried both settings but also toggled the setting for forcing it to use the defined values instead of auto detecting...same thing. Finally, I also read about modifying form submission from 7200 (the default) and increased it to 75,000, then I also tried a setting of -1 which was supposed to disable it. No matter what I tried, the same symptoms still occurred.

    I never noticed a problem like this before on my previous host, and I also think I read somewhere that 110mb.com uses a different type of server or proxy for www. connections? Could this be part of my problem? If so, is there any way around it for me? Does anyone else run a phpbb3 (I run the latest version, 3.02) forum on 110mb.com, and also have their own domain name forwarded there? I just wonder if anyone else has seen this problem before.

    Thanks! Any help is greatly appreciated!
     
    heweaver, Jul 19, 2008 IP
  2. astounding

    astounding Well-Known Member

    Messages:
    167
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    103
    #2
    It's because the cookie is set for (without) www. But when after login, it goes to www. version of domain, the cookie doesn't exist. Hence you're not signed in.

    Solution?

    Don't use www. version on 110mb with phpBB3 (only few scripts cause this). You can, with htaccess enabled, put following lines in your root htaccess file
    to redirect all www. to non-www:

    => http://www.webmasterworld.com/apache/3223535.htm


    Or you can only stick with www. but then you'll have to reinstall phpBB3 using http://www.yoursite.com/phpBB3/install.php version (www. infront, because the install sets config file).
     
    astounding, Jul 20, 2008 IP
  3. wattie

    wattie Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I would recommend you to put a .htaccess file and redirect all possible hosts to be without www:

    
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^haroldweaver.com$ [NC]
    RewriteRule ^(.*)$ http://haroldweaver.com/$1 [L,R=301]
    
    Code (markup):
     
    wattie, Jul 21, 2008 IP