• skanney1

    (@skanney1)


    i have 2 blogs (1 v 4.3 & 1 older). I haven’t touched either in a month and all of a sudden all the only page on the blog that does not return a 404 error is the home page. The permalinks are set to post name. The hosting company tells me it only works when it is set to default. So if I change the link on every page, we lose all of our inbound links (about a year of link building gone). The hosting company does not know what to do. I did check the code on wordpress that is recommended for the htaaccess file. making those changes did not work. also eliminating all plugins and updating wordpres did not work. there are 2 blogs: scarsdaleaikido.com/aikidoblog/ (old version of wordpress and no plugins at this point – the links do not work) and weightlosswestchesterny.com/weighlossblog/ (v4.3, plugins updated and not causing problem, works because hosting company changed the permalinks to custom and index/postname. I need postname only, not index/postname.

    Can anyone help? Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • bswajitgiri

    (@bswajitgiri)

    Login to your wp-admin.
    Go to Settings » Permalinks, and simply click on Save Changes button.
    Most of the time it fixes WP posts 404 error. If this one not helps you then update your .htaccess file. Before updating please take a back up.
    Here is the .htaccess code.

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

    Thread Starter skanney1

    (@skanney1)

    Thank you for your suggestions. The code you give here is what is already in my htaaccess file. I checked it electronically for accuracy. I also tried the save changes buttons several times.

    SuitePlugins

    (@suiteplugins)

    I understand that you have tried to save changes button several times but have you tried other permalink options to see if any of the others work?

    There is a possibility that Mod Rewrite is not enabled on your server. In order to confirm this, in the root of your installation create a file called test.php and add the following code

    <?php
    
     $res = 'Module Unavailable';
     if(in_array('mod_rewrite',apache_get_modules()))
     $res = 'Module Available';
    ?>
    <html>
    <head>
    <title>A mod_rewrite availability check !</title></head>
    <body>
    <p><?php echo apache_get_version(),"</p><p>mod_rewrite $res"; ?></p>
    </body>
    </html>

    Then visit your site yourdomain.com/test.php to see the results.

    Thread Starter skanney1

    (@skanney1)

    in the permalinks section, the default works. then the hosting company coded the custom to display /index.php/%postname%

    Nothing esle works. The hosting company claims mod_rewrite is enabled on all servers. I will upload your code to test.

    Thread Starter skanney1

    (@skanney1)

    when i uploaded your code and displayed test.php I got this error message: Fatal error: Call to undefined function apache_get_modules() in /home/scarsd5/public_html/aikidoblog/test.php on line 4

    SuitePlugins

    (@suiteplugins)

    Interesting. Please replace the current content with this line

    if(!function_exists('apache_get_modules') ){ phpinfo(); exit; }
    Thread Starter skanney1

    (@skanney1)

    I got back this: if(!function_exists(‘apache_get_modules’) ){ phpinfo(); exit; }

    SuitePlugins

    (@suiteplugins)

    Right, you are correct. I forgot to mention to wrap the script in PHP tags

    <?php
    if(!function_exists('apache_get_modules') ){ phpinfo(); exit; }
    ?>
    Thread Starter skanney1

    (@skanney1)

    check this page out for results http://scarsdaleaikido.com/aikidoblog/test.php

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘permalink problem out of nowhere’ is closed to new replies.