# Mod Rewrite apache help

**URL:** <https://forum.kirupa.com/t/mod-rewrite-apache-help/251710>\
**Category:** programming\
**Created:** [February 11, 2008, 11:19pm UTC](https://forum.kirupa.com/t/mod-rewrite-apache-help/251710 "2008-02-11T23:19:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neolumi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neolumi/32/1306_2.png) [@Neolumi](https://forum.kirupa.com/u/Neolumi)\
**Post date:** [February 11, 2008, 11:19pm UTC](https://forum.kirupa.com/t/mod-rewrite-apache-help/251710/1 "2008-02-11T23:19:52Z")

</div>

Hi, I’m having some issues working out how to phrase a certain rule.

Basically I want certain folders to act as normal, as my main rule is pretty all encompassing.

```auto
RewriteEngine On

RewriteRule ^!((rss|assets|forum)/?)$ $2/ [L]

RewriteRule ^([a-z0-9-]+)/?([a-z0-9-]+)?/?([0-9+])?/?$ index.php?1=$1&2=$2&3=$3 [NC]

```

what I’m attempting with that first rule is that someone who goes to:

[website.com/rss](http://website.com/rss) or [website.com/rss/](http://website.com/rss/) (an actual directory btw)  
ends up at [website.com/rss/](http://website.com/rss/) (using L flag to make it the last rule)

I can’t seem to quite get why it wont apply 😕  
Am using this cheat sheet: [http://www.ilovejackdaniels.com/cheat-sheets/mod\_rewrite-cheat-sheet/](http://www.ilovejackdaniels.com/cheat-sheets/mod_rewrite-cheat-sheet/)
