Geting 404 errors for all posts and categories

Discussion in 'WordPress' started by bluearrow, Feb 7, 2010.

  1. #1
    Recently I had to move one of my blogs to another hosting account. I moved all files and then did upload a mysql backup. Blog was working but if you click on a post or category you get a 404 error.

    I haven't changed anything.
    Permalink Settings is /%post_id%/%category%/%postname%.php

    whats the reason for this ?

    http://www.hardcoverbooks.info/
     
    bluearrow, Feb 7, 2010 IP
  2. mrhrk01

    mrhrk01 Well-Known Member

    Messages:
    664
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Ensure that the .htaccess file is present in the root folder. I think the problem could be due to the mod-rewrite /.htaccess issues.

    I think you will need the following code in the .htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
     
    mrhrk01, Feb 7, 2010 IP
  3. bluearrow

    bluearrow Well-Known Member

    Messages:
    1,339
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Ah I forgot to mention but I do have that code in my .htaccess file. :(




    .
     
    bluearrow, Feb 7, 2010 IP
  4. craiger22

    craiger22 Well-Known Member

    Messages:
    1,472
    Likes Received:
    99
    Best Answers:
    0
    Trophy Points:
    170
    #4

    Then you will need to add it :) thta is the problem.
     
    craiger22, Feb 8, 2010 IP
  5. bluearrow

    bluearrow Well-Known Member

    Messages:
    1,339
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #5
    What do you mean ? I said I do have that file. Means its in .htaccess file. >.<
     
    bluearrow, Feb 8, 2010 IP
  6. mrhrk01

    mrhrk01 Well-Known Member

    Messages:
    664
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    145
    #6
    Hiya

    Can you please show us what the .htaccess file contains ?

    Have you recently added any plugins (after moving your site from the old host) ?

    Also what are the ownership permissions for the .htacess file ?

    Kind Regards,
    mrhrk01
     
    Last edited: Feb 8, 2010
    mrhrk01, Feb 8, 2010 IP
  7. bluearrow

    bluearrow Well-Known Member

    Messages:
    1,339
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #7
    Here's what .htaccess has,


    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress


    No I haven't add any plugins or anything. I have just moved to another host.

    Another thing, When I change Permalink Settings back to default it everything work. This happen with custom permalink.

    /%post_id%/%category%/%postname%.html
     
    Last edited: Feb 8, 2010
    bluearrow, Feb 8, 2010 IP
  8. craiger22

    craiger22 Well-Known Member

    Messages:
    1,472
    Likes Received:
    99
    Best Answers:
    0
    Trophy Points:
    170
    #8
    Does your server have mod_rewrite disabled by chance.
     
    craiger22, Feb 9, 2010 IP
  9. bluearrow

    bluearrow Well-Known Member

    Messages:
    1,339
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #9
    Yeah That's the problem since its a new VPS. That make it worse since I'm new to VPS handling.

    I don't know if this can be done in Hyper VM or Kloxo ..
     
    bluearrow, Feb 9, 2010 IP
  10. BanchenK

    BanchenK Peon

    Messages:
    128
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    have you try permalink moved permanently 's plugin?
     
    BanchenK, Feb 9, 2010 IP
  11. bluearrow

    bluearrow Well-Known Member

    Messages:
    1,339
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #11
    Nop. But thanks finally I got it fixed. Problem was at VPS, mod_rewrite was not enable.


    Ben Thomas from btcentral.org.uk helped me to get it fix. I have to thank him for saving me from this nightmare. :)
     
    bluearrow, Feb 10, 2010 IP