Title: Manual mod_rewrite Rules
Last modified: August 18, 2016

---

# Manual mod_rewrite Rules

 *  [sebpayne](https://wordpress.org/support/users/sebpayne/)
 * (@sebpayne)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/manual-mod_rewrite-rules/)
 * I am attempting to use WordPress in a blog/CMS situation. I have WordPress installed
   in the /wordpress/ directory of my server. To access the About page, you currently
   have to go to /wordpress/about/ but I would like a rewrite rule so the user can
   go to /about/ to hit the page. I tried this rule:
 * `RewriteRule ^about/?$ /wordpress/about/`
 * And it failed and I don’t know why. Put this in the .htaccess in the / root directory
   of web server. I want it done manually for various reasons. I want to be able
   to access my blog (i.e. /wordpress/) from /blog/ – how can this be done with 
   rewrite?
 * Thanks
 * Seb

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/manual-mod_rewrite-rules/#post-474012)
 * This is just a partial answer…
    _I want to be able to access my blog (i.e. /wordpress/)
   from /blog/ _
 * The easiest way > rename the wordpress directory to “blog”.
    (Warning: you have
   to change the URI values in Options > General before doing it!)
 *  Thread Starter [sebpayne](https://wordpress.org/support/users/sebpayne/)
 * (@sebpayne)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/manual-mod_rewrite-rules/#post-474023)
 * Thanks moshu but that isn’t what I want. Because I have static pages too, their
   address with be /blog/about/ for example. Therefore, I will still have to manually
   edit my .htaccess to include these rules.
 * Does anyone have examples or experience of this matter?
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 6 months ago](https://wordpress.org/support/topic/manual-mod_rewrite-rules/#post-474025)
 * > I tried this rule:
   > RewriteRule ^about/?$ /wordpress/about/
   > And it failed and I don’t know why.
 * Assuming you put this in the .htaccess in the root, and you have your blog directory
   in /wordpress, then it failed because the setup is wrong.
 * The .htaccess in the WordPress directory is not being included because it’s not
   in the originally requested path. So the final rewrite doesn’t cause WordPress’s.
   htaccess rules to take effect, so the permalink you’re rewriting to (/wordpress/
   about/) doesn’t actually get evaluated as a permalink by the WordPress code. 
   It would work if you did a redirect ([R]), but that would cause the client browser
   to change the page URL, which is probably not your goal.
 * So rewrite to the explicit page URL instead. That would be /wordpress/index.php?
   page=## , where ## is the ID number of the page.
 * Understanding how .htaccess’s are evaluated is essential to understanding URL
   Rewriting. I’d look up the Apache documentation if I were you, might find it 
   useful.

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

The topic ‘Manual mod_rewrite Rules’ is closed to new replies.

## Tags

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

 * 3 replies
 * 3 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [19 years, 6 months ago](https://wordpress.org/support/topic/manual-mod_rewrite-rules/#post-474025)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
