# Htaccess mod rewrite

**URL:** <https://forum.kirupa.com/t/htaccess-mod-rewrite/240688>\
**Category:** Uncategorized\
**Created:** [October 5, 2007, 1:05am UTC](https://forum.kirupa.com/t/htaccess-mod-rewrite/240688 "2007-10-05T01:05:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Templarian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/templarian/32/7152_2.png) [@Templarian](https://forum.kirupa.com/u/Templarian)\
**Post date:** [October 5, 2007, 1:05am UTC](https://forum.kirupa.com/t/htaccess-mod-rewrite/240688/1 "2007-10-05T01:05:54Z")

</div>

```auto
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^admin/(.*) index.php?a=$1 [nc]
RewriteRule ^(.*) index.php?p=$1 [nc]

```

```auto
//so it works with
domain.com/admin/edit
domain.com/index

```

Whats the correct way to do this basically if the admin/ is found I don’t want it to run the url rewrite done for the second rule. is there a way to write

RewriteRule ^([]+) index.php?p=$1 [nc]

I don’t know what I would put in the [] to say not include the “/” but all other characters work.

Thanks. Very stuck on this.
