http://www. works but http:// does not?!

8 replies
  • WEB DESIGN
  • |
Hey guys.

My site Forex Phantom - Automatic Forex Robot Trading Software has a redirect set up and with www it works but without www it does not work.

Any suggestions or ideas why?

Thanks
#http or or #http or or www #http or or #http or or www #works
  • Profile picture of the author DarrenHill
    Hi willyboy104

    It looks as if the server that hosts your site does not have a permanent redirect from your non-www domain name to your www domain name (or visa versa).

    If you can access your root folder and if there is a .htaccess file already there (if not you can add one) you can do a simple (ish) 301 redirect (good for seo)

    Not sure of the code at present but can look up if needed.

    Check with your host also see if they can do it for you or find out why it's happening

    Hope that helps

    Darren
    {{ DiscussionBoard.errors[1557304].message }}
  • Profile picture of the author willyboy104
    Thanks Darren. I have took a look for the right redirect code but cannot seem to get it working.

    Anychance you could help?
    Signature
    If you want to learn how to make money online, no bullshit click here.
    {{ DiscussionBoard.errors[1557341].message }}
    • Profile picture of the author DarrenHill
      Hi

      check in your root folder where your website files are if there is a .htaccess file then start a new line and add the following code

      (If there is already a line that says RewriteEngine On then don't add this just add the other 2 lines underneath it)

      Code:
      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^forex-phantom.net$ [NC]
      RewriteRule ^(.*)$ http://www.forex-phantom.net/$1 [R=301]
      I think that should be it. I am not 100% on this as this is not my field but I think that should be it.

      Darren
      {{ DiscussionBoard.errors[1557429].message }}
  • Profile picture of the author willyboy104
    Thanks Darren, for some reason I keep getting this error now:

    The page isn't redirecting properly













    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.








    * This problem can sometimes be caused by disabling or refusing to accept
    cookies.

    Any ideas?
    Signature
    If you want to learn how to make money online, no bullshit click here.
    {{ DiscussionBoard.errors[1558471].message }}
  • Profile picture of the author madison_avenue
    You might be able to set up the redirect using your web hosts admin panel. I am with site5 and they have a URL Redirect panel under their web tools section. Your own host may have this too.
    {{ DiscussionBoard.errors[1558796].message }}
  • Profile picture of the author DarrenHill
    willyboy104

    Did you put the code in a .htaccess file as stated.

    I notice your non-www domain name is redirecting and the www isn't. not sure what's up there.

    Did you have anything else in the .htaccess file?

    Also do you use the forex-phantom.net site for anything else?

    if you have something installed at that address it may be trying to set a cookie but as you are 301-ing to another place it's causing problems as it's trying to set cookie for www. name not non-www.

    I'm not gonna be around today as I am off to celebrate the new year. Happy New Year by the way.

    If you can't get it to work. perhaps just put site back to where it was and we can tackle it in the new year.

    Darren
    {{ DiscussionBoard.errors[1558989].message }}
  • Profile picture of the author wayfarer
    Do you have other redirect rules after this one? If so, you should change the part that says:
    Code:
    [R=301]
    to say:
    Code:
    [R=301,L]
    This will cause the server to stop, and not process any more rewrite rules in the .htaccess file. Otherwise, the code looks to be correct.
    Signature
    I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
    {{ DiscussionBoard.errors[1559099].message }}
  • Profile picture of the author madison_avenue
    You can try this method:




    RewriteEngine On

    RewriteCond %{HTTP_HOST} !^www\.forex-phantom.net [NC]
    RewriteRule (.*) http://forex-phantom.net/$1 [R=301,L]
    {{ DiscussionBoard.errors[1559379].message }}

Trending Topics