Title: Easier permalinks solution.
Last modified: August 18, 2016

---

# Easier permalinks solution.

 *  [dtweney](https://wordpress.org/support/users/dtweney/)
 * (@dtweney)
 * [21 years ago](https://wordpress.org/support/topic/easier-permalinks-solution/)
 * I’ve hit upon a simpler way to get simple permalinks using WP 1.5, without requiring
   the big, hairy .htaccess code that WP generates. For some reason I could never
   pin down, my web server never worked right with that code — I would always get
   a 404 error page instead of the index.php output that a properly rewritten URL
   should have generated.
 * In my solution, you still need to edit your .htaccess file but the code is a 
   lot cleaner. Here’s how to do it:
 * 1. In your WP directory, copy index.php to a file just called “archive” (no extension).
   Like this:
 * cp index.php archive
 * (this is assuming you don’t have a folder called “archive” — if you do, you’ll
   need to pick a different name
 * 2. Edit your .htaccess file to add these lines:
 * # force archive file to be read as PHP
    <Files archive> ForceType application/
   x-httpd-php </Files>
 * 3. chmod 744 .htaccess — this will keep WP from overwriting your .htaccess file
 * 4. In the WP Permalink Options screen, set your URL structure like this:
 * /archive/%year%/%monthnum%/%day%/%postname%/
 * If you used a filename other than “archive,” change the first bit of that line
   above.
 * Then hit “Update Permalink Structure.” WP will tell you to modify your .htaccess
   file now — ignore it. You’re already all done.
 * Now what happens is that anytime someone enters an archive URL, it will get interpreted
   as the *file* “archive” — which is the same as index.php. Just remember, if you
   update index.php, to copy it over to the “archive” file again.
 * WP designers: You might consider making future versions of WP work this way. 
   Those rewrite rules are *gnarly*!

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

 *  [skippy](https://wordpress.org/support/users/skippy/)
 * (@skippy)
 * [21 years ago](https://wordpress.org/support/topic/easier-permalinks-solution/#post-216074)
 * [Ryan’s reduced rewrite rules](http://boren.nu/archives/2004/10/08/alternative-rewrite-rules/)
   aren’t gnarly at all, and they work great!
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [21 years ago](https://wordpress.org/support/topic/easier-permalinks-solution/#post-216075)
 * I think Skippy meant to include this link: [http://boren.nu/archives/2005/03/07/reduced-rewrite-plugin/](http://boren.nu/archives/2005/03/07/reduced-rewrite-plugin/)
 *  [skippy](https://wordpress.org/support/users/skippy/)
 * (@skippy)
 * [21 years ago](https://wordpress.org/support/topic/easier-permalinks-solution/#post-216080)
 * No, I meant to use
    [http://boren.nu/archives/2004/10/08/alternative-rewrite-rules/](http://boren.nu/archives/2004/10/08/alternative-rewrite-rules/)
   But botched it. Thanks for the heads-up.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [21 years ago](https://wordpress.org/support/topic/easier-permalinks-solution/#post-216083)
 * Not a problem. Both are still pretty darn easy to implement.

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

The topic ‘Easier permalinks solution.’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [21 years ago](https://wordpress.org/support/topic/easier-permalinks-solution/#post-216083)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
