Title: mod_rewrite problem
Last modified: August 18, 2016

---

# mod_rewrite problem

 *  [aleck](https://wordpress.org/support/users/aleck/)
 * (@aleck)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/mod_rewrite-problem-2/)
 * I’m having WP hosted at DreamHost, and trying to set .htaccess file for nice 
   URLs. This is the content of the .htaccess file, which resides in the site root.
   —-
   Options +FollowSymLinks +MultiViews RewriteEngine on RewriteBase / RewriteRule
   ^([~\/]+)$ /index.php?category_name=$1 [L] # 404 ErrorDocument 404 /404.php —-
   However, when I try some url like [http://site_name/life/](http://site_name/life/)
   if moves me to 404.php I specified in the last line. What am I doing wrong? Is
   the rule bad, or had DreamHost turned something off so this does not work? I 
   asked the support there, and they said that mod_rewrite is on, but that they 
   don’t offer help of setting up custom rewrite rules. This thing is really driving
   me crazy…

Viewing 1 replies (of 1 total)

 *  Thread Starter [aleck](https://wordpress.org/support/users/aleck/)
 * (@aleck)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/mod_rewrite-problem-2/#post-107571)
 * Yipi. I got it. Rewrite rules was wrong. This is the correct one.
    RewriteRule
   ^([^\/]+)/$ /index.php?category_name=$1 [L]

Viewing 1 replies (of 1 total)

The topic ‘mod_rewrite problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [aleck](https://wordpress.org/support/users/aleck/)
 * Last activity: [21 years, 7 months ago](https://wordpress.org/support/topic/mod_rewrite-problem-2/#post-107571)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
