Title: Permalinks 404 error
Last modified: August 19, 2016

---

# Permalinks 404 error

 *  [bubbles00](https://wordpress.org/support/users/bubbles00/)
 * (@bubbles00)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/permalinks-404-error/)
 * 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/](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/](http://bouncy-bubbles.net/2009/07/26/sample-post/)
 * Please tell me how to make these permalinks work. Help will be appreciated.
 * Thank you.

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

 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/permalinks-404-error/#post-1155950)
 * See: [http://codex.wordpress.org/Using_Permalinks#Using_.22Pretty.22_permalinks](http://codex.wordpress.org/Using_Permalinks#Using_.22Pretty.22_permalinks)
 * Ask your web host about mod_rewrite.
 *  Thread Starter [bubbles00](https://wordpress.org/support/users/bubbles00/)
 * (@bubbles00)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/permalinks-404-error/#post-1155952)
 * 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.
 *  [shane-g](https://wordpress.org/support/users/shane-g/)
 * (@shane-g)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/permalinks-404-error/#post-1156027)
 * 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.

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

The topic ‘Permalinks 404 error’ is closed to new replies.

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [permalinks](https://wordpress.org/support/topic-tag/permalinks/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [shane-g](https://wordpress.org/support/users/shane-g/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/permalinks-404-error/#post-1156027)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
