# RewriteRule

**URL:** https://forum.kirupa.com/t/rewriterule/238079
**Category:** programming
**Created:** [September 7, 2007, 1:15am UTC](https://forum.kirupa.com/t/rewriterule/238079 "2007-09-07T01:15:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lunetics](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@lunetics](https://forum.kirupa.com/u/lunetics)
#### Post date: [September 7, 2007, 1:15am UTC](https://forum.kirupa.com/t/rewriterule/238079/1 "2007-09-07T01:15:19Z")

</div>

I´ve a problem with rewrite rules in .htaccess. Can someone help me with the rewrite rules. The URL in the menu looks like this:  
[http://mydomain.com/articles](http://mydomain.com/articles)  
or  
[http://mydomain.com/about](http://mydomain.com/about)

The substitute would be index.php?page=ANYTHING  
The rule: RewriteRule Pattern index.php?page=$1

The other URL is when looking at a specific article and look like this:  
[http://mydomain.com/articles/53](http://mydomain.com/articles/53)

The Rule: RewriteRule Pattern index.php?page=article&id=$1  
or  
The Rule: RewriteRule Pattern index.php?page=$1&id=$2
