Results 1 to 10 of 10

Thread: http://domain.com not working

  1. #1
    New Registered User dmkc's Avatar
    Join Date
    Oct 2011
    Posts
    5

    Default http://domain.com not working 10 Jan 2012 @ 08.40

    Morning everyone,

    I'm sorry but it's early and my brain is failing badly!

    I've transferred a domain on to a new server, the www.domain.com works fine, but when you try http://domain.com it 404's on me.

    I know I need to edit the DNS, but I'm not 100% sure what I should add? Can someone point me in the right direction please?

    It's very much appreciated!!

      Reply With Quote

  2. #2
    Member janvt's Avatar
    Join Date
    Jan 2011
    Posts
    182

    Default 10 Jan 2012 @ 08.47

    DNS shouldn't be the problem. You probably just have to add a server alias, or fix this using .htaccess
      Reply With Quote

  3. #3
    New Registered User dmkc's Avatar
    Join Date
    Oct 2011
    Posts
    5

    Default 10 Jan 2012 @ 09.32

    Hi,

    I tried fixing it by editing my .htaccess from this:

    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase //
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . //index.php [L]
    </IfModule>

    to this:

    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase //
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . //index.php [L]
    RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
    RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]RewriteBase /
    
    </IfModule>
    but it just starts throwing up 500 errors on the www, and carries on with the 404? Do you have any idea where I'm going wrong?
      Reply With Quote

  4. #4
    Trusted Guru WelshStew's Avatar
    Join Date
    Dec 2008
    Posts
    2,555
    Blog Entries
    3

    Default 10 Jan 2012 @ 11.42

    This works for me:
    Code:
    RewriteEngine On 
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
      Reply With Quote

  5. #5
    Member janvt's Avatar
    Join Date
    Jan 2011
    Posts
    182

    Default 10 Jan 2012 @ 15.42

    It would help if you could tell us the domain. Or, just try pinging both variations of the domain: "server not found" -> DNS issue. If the ping can resolve the IP of your server then check your virtual hosts file if the server alias is present. For SEO reasons (duplicate content) it is also a good idea to implement a 301 redirect like WelshStew posted.
      Reply With Quote

  6. #6
    New Registered User dmkc's Avatar
    Join Date
    Oct 2011
    Posts
    5

    Default 10 Jan 2012 @ 16.01

    haha yeah that'd help!

    the domain is K3 Managed Services - Welcome to the future

    I've included a copy of the current .htaccess, if anyone could just give me some pointers on where I'm going wrong that'd be ace!

    Code:
    # Switch rewrite engine off in case this was installed under HostPay.
    RewriteEngine Off
    SetEnv DEFAULT_PHP_VERSION 5
    DirectoryIndex index.cgi index.php
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase //
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{HTTP_HOST} ^k3managedservices.com [NC]
    RewriteRule ^(.*)$ http://www.k3managedservices.com/$1 [L,R=301]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . //index.php [L]
    </IfModule>
    # END WordPress
    Last edited by Frinkky; 10 Jan 2012 at @ 18.08. Reason: Reformatted for legibility
      Reply With Quote

  7. #7
    Member shalom_m's Avatar
    Join Date
    Jan 2009
    Posts
    488

    Default 10 Jan 2012 @ 21.57

    Seems to work fine now
      Reply With Quote

  8. #8
    Trusted Guru wesh.co.uk's Avatar
    Join Date
    Dec 2008
    Posts
    16

    Default 11 Jan 2012 @ 00.07

    Just an idea, but have you not asked your hosting company for help with this yet?
    It "should" work with both, and thus you can then use the 301 redirect, but yours still doesnt work without the www.
      Reply With Quote

  9. #9
    New Registered User dmkc's Avatar
    Join Date
    Oct 2011
    Posts
    5

    Default 11 Jan 2012 @ 08.10

    Thanks guys, I was wondering if I was going mad there.... I'll have a chat with them
      Reply With Quote

  10. #10
    New Registered User dmkc's Avatar
    Join Date
    Oct 2011
    Posts
    5

    Default 11 Jan 2012 @ 13.11

    just to update, sorted it by just adding another A record to the DNS, with the first part being blank. Seems that's what the issue was.

    Thanks for helping me understand the issue though chaps
      Reply With Quote

Tags for this Thread

Posting Permissions

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