WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks 404 error (4 posts)

  1. Bubbles00
    Member
    Posted 5 years ago #

    My wordpress version is 2.8.2

    I was using the default permalinks till now and decided to change and make them 'pretty'

    I wanted this one

    %year%/%monthnum%/%day%/%postname%/

    Put it in the custom permalinks box and updated, it said the permalinks were updated successfully. I see the desired permalink url structure when I click on posts titles in my page but when I click them, it gives me 404 error.

    I have wordpress installed in a directory called blog. My .htaccess file for root wordpress directory is:

    # BEGIN AnyFont
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^images/(.*)/(.*)\.png$ /blog/wp-content/plugins/anyfont/img.php [L]
    </IfModule>
    
    # END AnyFont
    
    # BEGIN AnyFont
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^images/(.*)/(.*)\.png$ /wp-content/plugins/anyfont/img.php [L]
    </IfModule>
    
    # END AnyFont
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    # END WordPress

    I tried using the common settings option with index.php http://bouncy-bubbles.net/index.php/2009/07/26/sample-post/
    and it worked with that, the permalinks were working..

    I do not want the index.php url though, I want something like this:

    http://bouncy-bubbles.net/2009/07/26/sample-post/

    Please tell me how to make these permalinks work. Help will be appreciated.

    Thank you.

  2. iridiax
    Member
    Posted 5 years ago #

  3. Bubbles00
    Member
    Posted 5 years ago #

    thank you for help but nothing else worked and finally I found the solution at my host's support forum!!

    If anyone else is having a problem, you can try this too but always backup your original files.

    edit the /wp-includes/vars.php file (always save the original one as backup)

    Find this:

    // Server detection

    Change this text and everything under it to:

    // Server detection
    // $is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false;
    $is_apache = 1;
    $is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) ? true : false;  
    
    ?>

    Save and upload in wp-includes folder..
    Change the permalinks structure from your dashboard and check if they work.

    I tried everything before but nothing worked, this did.

    Good luck.

  4. Shane G
    Member
    Posted 5 years ago #

    Hi,

    Set your desired permalink and add this code in htaccess and have a check:

    # BEGIN WordPress

    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Thanks,

    Shane G.

Topic Closed

This topic has been closed to new replies.

About this Topic