# Mod\_Rewrite Niggle!

**URL:** <https://forum.kirupa.com/t/mod-rewrite-niggle/282972>\
**Category:** programming\
**Created:** [February 28, 2009, 8:23pm UTC](https://forum.kirupa.com/t/mod-rewrite-niggle/282972 "2009-02-28T20:23:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thedaveyb](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@thedaveyb](https://forum.kirupa.com/u/thedaveyb)\
**Post date:** [February 28, 2009, 8:23pm UTC](https://forum.kirupa.com/t/mod-rewrite-niggle/282972/1 "2009-02-28T20:23:39Z")

</div>

Hey Kirupians…I have seem to have hit a brick wall adding Mod\_Rewrite to a site.

The site is PHP/MySQL driven and includes a product database. The products are arranged in a category/product format.

The Mod\_rewrite rule for the categories as shown below works fine.

[http://www.atgairports.com/C13-Installation-Services/](http://www.atgairports.com/C13-Installation-Services/)

```auto

RewriteRule ^C([0-9]+)(.*)/$ product-listing.php?i=$1 [L]
RewriteRule ^C([0-9]+)(.*)$ http://www.atgairports.com/B$1$2/ [R=301,L]

```

Altho the product one as shown below just keeps bouncing back to the category page - no error or anything?..

> **[Airfield Lighting Contractor & Installation | Turnkey Solutions | ATG Airports](https://www.atgairports.com/turnkey-solutions)**
>
> At ATG we offer our customers a wide range of services including turnkey airfield solutions, designed to make the process more effective and straightforward

```auto

RewriteRule ^C([0-9]+)(.*)/P([0-9]+)(.*)/$ product-detail.php?i=$3 [L]
RewriteRule ^C([0-9]+)(.*)/P([0-9]+)(.*)$ http://www.atgairports.com/C$1$2/P$3$4/ [R=301,L]

```

Any ideas as I am befuddled??
